PHP onsubmit in the form not going to the fuction.


Posted on 16th Feb 2014 07:03 pm by admin

I have a form through ‘onsubmit’ calling a function validation(). But not going to the function at all. Why?

<form action="member.php" method="post" name="frmlogin" id="frmlogin" onsubmit="return validation();" enctype="multipart/form-data">
.
.
.
</form>

The function code :-
<script language="javascript">

function validation()
{

if(document.frmlogin.title.value=='')
{
alert("Please enter Title")
document.frmlogin.title.focus();
return false;
}
}
</script>

No comments posted yet

Your Answer:

Login to answer
263 Like 29 Dislike
Previous forums Next forums
Other forums

Time script, set to my time zone?
I am using this line to get the date and time

Code: $time = date(F." ".d.", &q

Include ("Absolute Path") of a file?
I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,

This is my first time on your website and please excuse if I am asking silly que

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

Entering Data Problem
Code: $result = mysql_query("SELECT * FROM flights");
while ($row = mysql_fetch_array($

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash