Skip to content Skip to sidebar Skip to footer

(php&javascript) A Href Add Button Won't Work On Mozilla But Works On Ie And Google

I am not really certain if the add button is responsible for the problem since it is working on other browsers perfectly. I hope you could help me in someways. Thank you. By the wa

Solution 1:

Something is wrong with this code:

<ahref="#"onclick="javascript: validateForm(action);return false;">

It should be written as:

<ahref="#"onclick="validateForm(document.forms['userLocation'].action);return false;">

to point your validator to the form's action.

Solution 2:

You may not put javascript: into onclick attribute. Attributes with on prefix are callbacks (valid JS functions). javascript: is something like protocol specification. So you may use javascript: only in href attribute. Something like:

<a href="javascript: alert(123)">test</a>

To fix your problem just remove javascript: from onlick.

<divid="addBtn"><ahref="#"onclick="validateForm(action);return false;"><imgsrc="images/add.png"height="27"width="60"></a></div>

Post a Comment for "(php&javascript) A Href Add Button Won't Work On Mozilla But Works On Ie And Google"