stockton Posted March 5, 2007 Share Posted March 5, 2007 I need to pass two parameters from my Web page to a simple Ajax script. Please tell me how I achieve this? My html looks like:- <input type=text value="" name="CardNumber" id="CardNumber" onChange="sendRequest($Event, this)"> and in my Ajax script I have:- http.open('get', 'T3.php?EventID='+Event'&MemberNum='CardNumber'); and as I get Error: missing ) after argument list Source File: http://10.0.0.3/FrontierEvents/js/ajax.js Line: 27, Column: 43 Source Code: http.open('get', 'T3.php?EventID='+Event'&MemberNum='CardNumber'); Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 6, 2007 Share Posted March 6, 2007 you need a + after Event: http.open('get', 'T3.php?EventID='+Event'&MemberNum='CardNumber'); and before CardNumber and leave off the single quote after Cardnumber Quote Link to comment Share on other sites More sharing options...
stockton Posted March 6, 2007 Author Share Posted March 6, 2007 Is it as simple as http.open('get', 'T3.php?EventID='+Event'&MemberNum='+CardNumber); If so thank you very much. Quote Link to comment Share on other sites More sharing options...
stockton Posted March 6, 2007 Author Share Posted March 6, 2007 After making your suggested change, unless I misunderstood I still get:- Error: missing ) after argument list Source File: http://10.0.0.3/FrontierEvents/js/ajax.js Line: 27, Column: 43 Source Code: http.open('get', 'T3.php?EventID='+Event'&MemberNum='+CardNumber); is the ampersand(&) between Event' and MemberNum correct? Quote Link to comment Share on other sites More sharing options...
stockton Posted March 6, 2007 Author Share Posted March 6, 2007 The solution was:- http.open('get', 'T3.php?EventID='+Event+'&MemberNum='+CardNumber); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.