Страница 1 из 1

JavaScript or PHP bug?

Добавлено: 25 сен 2003, 13:49
Ivan
We have the next form index.php:

Код: Выделить всё

<html>
<body>

<form action="doit.php" method="post">

Username: 
<input type="text" name="uname" maxlength="40">
<a href="newwindow.php" target=_blank onClick="popupWin = window.open(this.href, 'contacts', 'width=400,height=300,top=100'); popupWin.focus(); return false;">[?]</a>


Age: 
<input type="text" name="age" maxlength="4">
<input type="submit" name="submit" value="Login"><br>

</form>

</body>

</html>
The problem is that if you click on [?] and then you fill up the fields, submit the form. When you return back to the form the fields are empty. If you don't click [?] before submiting the form everything is ok.

Now, if a change the extension of index.php to index.html and repeat all these steps vererything is cool again. Somebody have met something similar?

Добавлено: 29 сен 2003, 18:44
Marmot
IMHO it's your browser issue.
Back button behavior is not specified by http://www.w3.org/Protocols/rfc2616/rfc ... l#sec13.13 for HTML forms. :twisted:

Добавлено: 30 сен 2003, 11:50
Ivan
I just tested and Opera and everything was fine. So, you are right it is a Explorer issue.