Serve using javascript in Google Chrome only once

I have a simple form.

<form target="_blank" action="somescript.php" method="Post" id="simpleForm">
<input type="hidden" name="url" value="http://...">
<input type="hidden" name="code" value="wrxosf">
</form>

... and there is an anchor link

<a href="#" onclick="$('#simpleForm').submit();return false;">Do it!</a>

It works fine in FireFox or IE, but Google Chrome. Chrome does it once, and then the link becomes invisible.

+5
source share
4 answers

Also there was such a problem.

The solution was to add something random to the url every time before submitting.

HTML:

<form action="go.php" method="post" target="_blank" id="go">
...
</form>

JavaScript (jQuery):

$('#go').attr('action','go.php?'+Math.random()*1000).submit();
+7
source

Forms with target = "_ blank" are submitted only once. These are webkit and chromium errors.

+6
source

Chrome 7.0.5 . , , - !:)

+1

​​ Chrome 5.0.375.55

0

All Articles