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

 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.