Jump to content

Form using AJAX / jQuery to set session with dropdown menu


Recommended Posts

I believe this question will involve AJAX, jQuery, PHP, and sessions.  I've tried for days and can't crack this.  Starting fresh after many walks.

 

I simply want a form with a dropdown box that does NOT refresh/reload the screen.  Saves the selection as a SESSION and "selects" or highlights the dropdown choice based on the session they just set.

 

So in a nutshell...

- Client selects the option (must use onchange event instead of clicking submit)

- using jQuery / AJAX this helps to prevent the page from reloading (correct?)

- dropdown choice is "remembered" because it uses the session to compare and "selects" it.

- Also able to echo / print the session on the same page.

 

I'm going to be using this simple example in multiple steps of an ordering form which uses check boxes, radios, input boxes, and dropdown menu.

 

If anyone knows of a simple example using a dropdown box, that would get me started.

 

The attempts I had before would only set a session using the first or last of the dropdown list instead of the one chosen.

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.