Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 16th, 2015, 07:13 AM
Sree Aka Sree Aka is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2015
Posts: 1 Sree Aka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 33 sec
Reputation Power: 0
PHP, Javascript Help Required

Hi All,

I am new to this forum. I have been developing a interface and have got stuck with PHP and Javascript.

**My Site has 3 Buttons**
<button id="ProjectSource" class="testbutton" onClick="AddNewProject(this.id);">Project Source</button>
<button id="SelfCons" class="testbutton" onclick="AddNewProject(this.id)">Self Cons</button>
<button id="Currency" class="testbutton" onclick="AddNewProject(this.id)">Currency</button>

These buttons are sent to a Javascript function on the same page which will store the button ID in a variable, which is later used in another PHP.

Now I have an Select Box in the same page and I get the data from the database using PHP.

PHP Code:
<select size="10" id="Database" onClick="ClearAdd()" >
                            
                            <?
php
                                
                                
while($row mysql_fetch_assoc($get))
                                {
                                    
?>
                                    <option value = "<?php echo($row['ProjectSource'])?>" >
                                    <?php echo($row['ProjectSource']) ?>
                                    </option>
                                    <?php
                                
}               
                            
?>
                        </select> 


**My First Problem is**
If you see I am currently using $row['ProjectSource']), But what I need is the ID of the buttons which corresponds to the field name in the database.

**My Second Problem is**
The Select functions loads when the page loads, I want that to refresh when I click on any buttons.

Thanks in Advance for your help!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > PHP, Javascript Help Required


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap