Jump to content

[SOLVED] action and submit


squiblo

Recommended Posts

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>"; ?>

Link to comment
Share on other sites

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>"; ?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.