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

for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

How can you detect variable string in a massive string?
Ok guys, i need some help with this one.

I am going to be getting a large string, like 10-20

Multi-user card game
I'm writing a batch of games and such. Lottery is finished, Poker,blackjack,etc are next. They will

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

Which PHP-Editor do you think is the best?
Hi everyone,
Myself Brian Anderson. For the last 2 years i have been working a

no idea what to do...
I'm fed up. I had issues with code that I have working on a different site that didn't work on my cu

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

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