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

need help with date function
i have following form for date

Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01

Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:

http://www.mydomain.com/directory/index.php

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

Insert data in Mysql and move to another page
I'm stuck with this simple problem. I need to insert data in Mysql and then hit submit and move to a

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

SAP Business Suite
Hi all:

Within the SAP Business Suite solution I would like to ask you the main differenc

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

Include with Parameters
In a particular page I would like to include a file that requires $_GET parameters.

when I go

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