Henk Z Henk Z - 1 year ago 90
HTML Question

JavaScript form submit does not work in Firefox

I use the following script and it is working well for other browsers, but it does not work in Firefox.

What does not work, is when clicking on the

<a href>

How can I solve this?

function submitform() {

<a class="pakb-box" href="javascript: submitform()" target="_blank">
<p class="pakb-box-icon"><i class="icon-webadresgegevens"></i></p>
<form id="serverlogin" action="http://example.com" method="post" target="_blank">
<input name="token" value="1234567890" type="hidden">
<input name="SESSID" value="1234567890" type="hidden">
<input name="PHPSESSID" value="1234567890" type="hidden">
<input value="Open" type="submit">

Answer Source

try this

remove the href attribute . and put onclick instead

<a class="pakb-box" onclick="submitform()" target="_blank"> 

instead of

 <a class="pakb-box" href="javascript: submitform()" target="_blank">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download