I am using a jQuery Modal popup script. It can be downloaded from:
Modal Popup
I did come across an issue while using this script. I am using the modal window to show a contact form. Now within this modal window contact form, I have attached the following event to the form:
<form id="frm_contact" name="frm_contact" method="post" action="index.php" onsubmit=”return validateform(this);”>
So what I am trying to do is, validating the input upon clicking the submit button/form submission. An extract from this JS is following:
function validateform(frm_contact)
{
alert(‘hi’);
return false;
}
As you can see, I expected the ‘hi’ to popup but that never happened. This means that no alerts would be shown for any of the input fields upon validation. So in short, I am unable to show alerts within this modal window. How can I fix it so that I can show the alerts?
Which browser are you using? Are you certain
validateformis being called, is it visible in scope from the document containingform?