I have a form that must execute a javascript function on submit, the function then posts data to my php send mail file and the mail is sent. But it only works in fire fox. The form action does not seem to be doing anything in IE, my question is: Is this the correct way to call a function from an external file from the form action:
action="javascript:simpleCart.checkout()"
simpleCart is the .js file and checkout() is the function.
Tips appreciated, struggling to understand why it would work in firefox but not IE, chrome or safari.
<form name=form onsubmit="return validateFormOnSubmit(this)" enctype="multipart/form-data" action="javascript:simpleCart.checkout()" method="post">
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…