Jump to content

Recommended Posts

i have a drop down list populated with entry from table and when i click on it, an ajax call is made to retrieve relevant info from table and displayed to user.....now what i want is when i click on another link on same page for a pop up window, the pop up window url should append this selected drop down id? tried sessions, but what happens is when the page reloads i get the value and not without refreshing the page....could anyone help me in this?googled but dint find a relevant topic for this specific requirement.....

 

{P.S. - POSTED IN AJAX HELP ALREADY SO PLEASE DONT MOVE IT THERE}

Link to comment
https://forums.phpfreaks.com/topic/219973-to-get-dropdown-list-value/
Share on other sites

{P.S. - POSTED IN AJAX HELP ALREADY SO PLEASE DONT MOVE IT THERE}

http://www.phpfreaks.com/forums/ajax-help/get-value-of-ajax-dropdown/

So basically, you waited for about 90 minutes before deciding it was a good idea to ask the same question, on the same site, to very likely many of the same people, because it didn't occur to you that maybe, just maybe, you weren't getting any answers due to the fact that (a) it's the middle of the night in the US on (b) a Thanksgiving © weekend?

By asking in AJAX it shows that you aren't quite sure what you're supposed to do, which explains why you couldn't find the answer on Google. Spoiler: Google only helps if you know what you're looking for.

 

You have some JavaScript code using window.open, right? If you don't, get that first. Modify the URL for the popup to include the ID - just like you would for any other URL at any other time. To get the value there are a couple choices, and which you choose depends on where the link is going to go and how you do the popup.

 

Example: using a function and getElementById.

...

Click

function showwhateverpopup(whateverID) {
    // your URL will look like "...whatever.php?id=" + whateverID
    // ...
}

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.