Jump to content

How do I pass two parameters from HTML page to Ajax


stockton

Recommended Posts

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');

 

 

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.