views:

1912

answers:

4

I have simple form.

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

...and there are some anchor link

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

It works fine in FireFox or IE, but Google Chrome. Chrome does once, then link become unclickable.

+5  A: 

Forms with target="_blank" submiting only once. This is webkit & chromium bugs.

RayZ
Same thing happens with target="SomethingElse". (Ilya's solution works for that case as well.)
ijprest
+4  A: 

Also had such problem. The decision was to add something random to url each time before submiting.

HTML:

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

Javacript (jquery):

$('#go').attr('action','go.php?'+Math.random()*1000).submit();
Ilya
A: 

This problem was fixed in the latest version of Chrome 5.0.375.55

Johann
A: 

I'm running Chrome 6.0.472.59 and still have this issue

Rowan