kwstephenchan Posted February 8, 2010 Share Posted February 8, 2010 Hi, I have 1 php page (page 1) which has a button. On clicking of this button, another php page (page 2) will pop up with a list of values from the database. User will select one of these values and this value will be displayed on page 1. I know I must use ajax but don't know how. What I can do is to pass a value from page 1, through javascript (and a php which does not have user interface) get a value from the database and pass it back to page 1. What I am having trouble with is that the second page will have an interface for user to select. Just can't figure this out. Is there any suggestion or sample code that I can study. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/191355-getting-selected-value-from-page-2-and-passing-back-to-page1/ Share on other sites More sharing options...
Ang3l0fDeath Posted February 12, 2010 Share Posted February 12, 2010 save yourself the trouble of having page 2 pop-up. Have page 2 form displayed on page 1. If you need a inwindow pop up look form a in-window pop-up. not another actual window. 1 way you can do that is using <div> then picking the size, height-width-position of div window. Then hide/show the table for when you want to use it or not. You might even save yourself the trouble of using AJAX if you build the div window inside the FORM section. Really what your trying to do is more complicated than it really has to be. There is generally always a simpler way to do stuff. Quote Link to comment https://forums.phpfreaks.com/topic/191355-getting-selected-value-from-page-2-and-passing-back-to-page1/#findComment-1011436 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.