Passing Form info to Javascript Pop-up Window

liunx

Guest
Hi there,<br />
I wonder if anyone can help me with this one. It would be easier to understand what my problem is if you take a look at the page <!-- w --><a class="postlink" href="http://www.uk.godsweb.co.uk">www.uk.godsweb.co.uk</a><!-- w -->. <br />
<br />
At the bottom is a domain search form. If I use the standard <form action="http://uk.godsweb.co.uk/cgi-bin/shop/cart.pl" method="post"> the script returns the whois results perfectly. So that works fine. <br />
<br />
The problem comes though because I want the results to appear in a pop-up window. Now adding the target="_blank" to the above also works, but I want to define the size and parameters of the pop-up.<br />
<br />
So on the page <!-- w --><a class="postlink" href="http://www.uk.godsweb.co.uk">www.uk.godsweb.co.uk</a><!-- w --> there is a javascript. Most of it is in the head of the document, and this means that the form action line has to become<br />
<br />
<form action="javascript:myopen('http://uk.godsweb.co.uk/cgi-bin/shop/cart.pl','helppopup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resiz able=no,copyhistory=no,width=800,height=500')" method="post"><br />
<br />
Nothing special so far. The pop-up works exactly as it should, but for some reason the script does not output the whois results. The script does come into play, but it is as if no information has been passed to it.<br />
<br />
Can anyone tell me how I can achieve the result I want?<br />
<br />
To put it simply, I really can't understand why the browser will pass the information to the script if I use the form command as normal, and also when I tell it to open in a new window using the standard target="_blank"<br />
command, but fails to give whois results when I use JS to simply define the size and attributes of the window being opened.<br />
<br />
Anyone Help? thanks in advance!<!--content-->If you can fix all the [errors (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.uk.godsweb.co.uk%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=&outline=&sp=">http://validator.w3.org/check?uri=http% ... tline=&sp=</a><!-- m -->)] then it will make it a lot easier to see what is going on. All are easy fixes.<!--content-->The server side script probably tries to write back to the window from which the request was submitted.<br />
<br />
Your option is to dynamically write a form (using document.write) into the new window and submit the form using javascript. Google will then return the data to the new window.<br />
<br />
e.g. the search input element box in your main window is really only a dummy. The data from this box is written to a form in the new window together with all the form data and then the form is submitted from the new window.<br />
<br />
If you need help constructing this script let me know and I'll take a stap at it (send me a PM), but I think this is your only option.<!--content-->That last post sounds feasible to me, but I'm not a programmer. Can anyone help with that?<!--content-->
 
Back
Top