Glaanieboy
OSNN Veteran Addict
- Joined
- 6 Mar 2002
- Messages
- 2,628
I just created a test PHP/HTML script with this code:
As you can see, I specified the target="_self" which means that it shouldn't open a new window, but stay in the active window. But, for some reason, it does open a new window. When I click one of the buttons in the second window, it stays in the current window, like it should. Does anyone know how to correct this problem? Is it because I have 2 submit buttons?
I first thought it was a bug in Mozilla Firebird, but it does the same in Internet Explorer 6.0
edit: here is the link: http://allhope.geffychan.co.uk/~glennhof/test/submit.php
Code:
<HTML><HEAD><TITLE>TEST</TITLE></HEAD><BODY>
Test page
<FORM target="submit.php" method="GET" target="_self">
<INPUT type="hidden" name="bla" value="blie">
<INPUT type="submit" name="delete" value="Submit this(delete)">
<INPUT type="submit" name="edit" value="Submit this (edit)">
</FORM>
<?php
if ($_GET['delete']){
$value = $_GET['bla'];
print "deleted $value";
}
if ($_GET['edit']){
$value = $_GET['bla'];
print "edited $value";
}
?>
</BODY>
</HTML>
As you can see, I specified the target="_self" which means that it shouldn't open a new window, but stay in the active window. But, for some reason, it does open a new window. When I click one of the buttons in the second window, it stays in the current window, like it should. Does anyone know how to correct this problem? Is it because I have 2 submit buttons?
I first thought it was a bug in Mozilla Firebird, but it does the same in Internet Explorer 6.0
edit: here is the link: http://allhope.geffychan.co.uk/~glennhof/test/submit.php