View Single Post
Old 05-26-07, 09:09 AM   #5
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: Need help with updating entries automatically...

i figured out how to do it.

i added an "onchange" event that linked to a javascript function. the function was called with the value of the newly selected item (the variable this.value was passed to the function which just directed to a new page, which was the value of the select option). for each item, the value was set to the same page with a GET method.

so the link was:
pagename.php?company=selectedcompanyname

then i used a $_GET['company'] call in PHP to get the value and set the selected item

Quote:
Originally Posted by fivefeet8
If you don't want to go the javascript route, you could post the page back onto itself everytime you select a different company from the list. The post data would contain the currently selected company and your php script can then use that POST data to fill the projects list. You could also try using a session variable to store the currently selected company. Of course this means everytime you select a different company from the list, the page reloads.
yes, this is what i did pretty much
thx.
ViN86 is offline   Reply With Quote