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

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this

('date' => '20

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

Function module "DPS_CHECK_TABLE_EXISTS" not found (after OSS 1422843 impl)
Dear All,

I implemented Note OSS 1422843.

When i execute the new report RSPO20

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

Facebook status update API
Hello,

So, I'm trying to create my first Facebook application with PHP.

Basic ideas fo

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

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