I need help getting data from a form input into the url of a popup window. This is what I've tried: <form name="form" action="post.php" method="post"> Your name:<br> <input type="text" name="name"> <input type="submit" name="submit" value="Submit" onClick="window.open('http://www.website.com/site.php?name= + form.name.value','newwindow','width=500','height=500');> </form> Code (markup): Why isn't this working and what can I do to make it work?
The most important part of a script is what is inside the post.php file. This is what actually does the work or takes the text from the webpage and inputs it into the url window. I'm not sure about taking it from one page and adding it to another but it should be doable. Since this is a php question(seems like it to me) try posting the same question in the forum for php help.
Yes, but correct me if I'm wrong, If I use the php file to open the popup then it will be blocked by most popup blockers as the user doesn't directly click anything to make it come up.