squiblo Posted September 23, 2009 Share Posted September 23, 2009 my aim is to open a new window and put some information in the new windows url by using "method='GET'" but when i click the submit button i do not want the original page to redirect to any other page, how can this be done? i have tried doing these different things but none work... this problem with this code is that the original page redirects and the new window does not have the information (pageid) in the url.... <?php if ($img1) echo "<td width='33.3%' align='center'> <FORM action='images.php' method='GET'><input type='hidden' name='pageid' value='$pageid'> <INPUT type='submit' name='images' value='Images' onClick=\"window.open('http://www.squiblo.com/images.php','mywindow','width=600,height=400,left=0px,top=0px,status=no,location=no,resizable=no,scrollbars=no')\"> </FORM> </td>"; ?> when i click submit with this code (with the action as current page) the original page stay the same but the new windows url does not hold the pageid <?php if ($img1) echo "<td width='33.3%' align='center'> <FORM action='' method='GET'><input type='hidden' name='pageid' value='$pageid'> <INPUT type='submit' name='images' value='Images' onClick=\"window.open('http://www.squiblo.com/images.php','mywindow','width=600,height=400,left=0px,top=0px,status=no,location=no,resizable=no,scrollbars=no')\"> </FORM> </td>"; ?> Quote Link to comment Share on other sites More sharing options...
squiblo Posted September 23, 2009 Author Share Posted September 23, 2009 sorry, ive just figured it out, im tired. <?php if ($img1) echo "<td width='33.3%' align='center'> <FORM action='' method='GET'><input type='hidden' name='pageid' value='$pageid'> <INPUT type='submit' name='images' value='Images' onClick=\"window.open('http://www.squiblo.com/images.php?pageid=$pageid','mywindow','width=600,height=400,left=0px,top=0px,status=no,location=no,resizable=no,scrollbars=no')\"> </FORM> </td>"; ?> Quote Link to comment 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.