devilinc Posted November 27, 2010 Share Posted November 27, 2010 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} Quote Link to comment https://forums.phpfreaks.com/topic/219973-to-get-dropdown-list-value/ Share on other sites More sharing options...
devilinc Posted November 27, 2010 Author Share Posted November 27, 2010 so i need to find a way here to get the value of the drop down when it is selected....i could then be able to store in my php page so that i can append it the other url.......can i use javascript after the ajax call to get the value? Quote Link to comment https://forums.phpfreaks.com/topic/219973-to-get-dropdown-list-value/#findComment-1140243 Share on other sites More sharing options...
requinix Posted November 27, 2010 Share Posted November 27, 2010 {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 // ... } Quote Link to comment https://forums.phpfreaks.com/topic/219973-to-get-dropdown-list-value/#findComment-1140245 Share on other sites More sharing options...
devilinc Posted November 29, 2010 Author Share Posted November 29, 2010 i mentioned it as P.S.....i posted in both ajax and php coding section cos i thought maybe just maybe some guys fluent in ajax and php would drop a solution for me.....ocuh!!! tch!!! tch!!! Quote Link to comment https://forums.phpfreaks.com/topic/219973-to-get-dropdown-list-value/#findComment-1140791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.