todayme Posted March 5, 2007 Share Posted March 5, 2007 I have gathered the values of two text boxes by using the upon change event for the second drop down box, I have tested it by printing out the values and the variables are holding the right information. I need to pass this to a script in php to do some other things. Below is a function I have written in PHP to grab the variables and pass them into new ones and print. function grabvariables() { $dbindustry = $cool_industry; $dbstate = $cool_state; Print $dbindustry.'<br>'; Print $dbstate; } This is the java script that I call on the change event of the second drop down box. <SCRIPT LANGUAGE="javascript"> function captureselection() { var locatestate = window.location var locateindustry = window.location document.Leads.State.value = locatestate document.Leads.Industry.value = locateindustry var $cool_state = document.Leads.State.value var $cool_industry = document.Leads.Industry.value function grabvariables() } </SCRIPT> Its not print anything grrrrrrrrrrrr. The questions I have are this, I now the values are loaded in the variables $cool_state and $cool_industry as I have tested this far, but is that how you call a function that is php? function grabvariables() And also if I load variables with java script can I get at them with PHP? Link to comment https://forums.phpfreaks.com/topic/41215-please-help-on-this-one-gurus-come-this-way/ Share on other sites More sharing options...
fert Posted March 5, 2007 Share Posted March 5, 2007 but is that how you call a function that is php? function grabvariables() The only way that I know of is Ajax And also if I load variables with java script can I get at them with PHP? again Ajax Link to comment https://forums.phpfreaks.com/topic/41215-please-help-on-this-one-gurus-come-this-way/#findComment-199637 Share on other sites More sharing options...
todayme Posted March 5, 2007 Author Share Posted March 5, 2007 ggggggrrrrrrrrrrrr Ajax can I use this with PHP .............. Oh geeeesus........... Got any examples? Link to comment https://forums.phpfreaks.com/topic/41215-please-help-on-this-one-gurus-come-this-way/#findComment-199640 Share on other sites More sharing options...
fert Posted March 5, 2007 Share Posted March 5, 2007 http://developer.mozilla.org/en/docs/AJAX:Getting_Started Link to comment https://forums.phpfreaks.com/topic/41215-please-help-on-this-one-gurus-come-this-way/#findComment-199642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.