JavaScript or PHP bug?

Все, что вы хотели знать о программизме, но боялись спросить.
Ответить
Ivan
Частый Гость
Сообщения: 15
Зарегистрирован: 28 фев 2003, 18:04

JavaScript or PHP bug?

Сообщение 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?
Аватара пользователя
Marmot
Графоман
Сообщения: 39274
Зарегистрирован: 17 фев 2003, 17:58
Откуда: Caulfeild
Контактная информация:

Сообщение 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:
Ivan
Частый Гость
Сообщения: 15
Зарегистрирован: 28 фев 2003, 18:04

Сообщение Ivan »

I just tested and Opera and everything was fine. So, you are right it is a Explorer issue.
Ответить