Jump to content

pass variable to another page based on which link a user clicks on


Recommended Posts

Hi--

 

I've never done AJAX before but I am told that's what I need to do.  I need to pass an email address from a list of email addresses to a form on another page so the selected email address can be passed into a form for emailing the recipient.

 

I need the email address to be passed to be based on which link is clicked.  If I can grab this value I can assign it to a session variable and then pass that to the form.  Can someone help me with this?  I'd appreciate some really clear examples as I am an AJAX noob.

why would you want to use ajax for this, just click a link and direct them to the page..

 

page.php?email=1/2/3/4

 

etc and do it that way and in page.php for  1 make it xxx@bla.com for 2 make it yz2@blabla.com

 

etc etc

 

but if you absolutely want to do it with ajax. (I really don't see a point)

 

you can just request a page via POST OR GET and send a value to it..

 

here for some pointers..

 

http://www.openjs.com/articles/ajax_xmlhttp_using_post.php

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.