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

mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from

Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

check_changed_data - I can't get data from the called method event
I use check_changed_data to trigger my event method.

The method delivers er_changed_data.

Including calander to page - will not show other months than current??
im trying to add an existaing calander onto a profile page by using Code: <?php include "

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

How to get variable value on next page
Hello friends
i am working on payentry page ..there i have this code.........

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added

AutoChoosing a CSS file based on URL
Hey everyone,

I have a site that has multiple URLs and CSS files.

Based on the URL tha

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