Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Jquery Form Validation Plugin Not Working
24/05/2010
13:53
Avatar
nayanjyotionline
india
Member
Members
Forum Posts: 7
Member Since:
24/05/2010
sp_UserOfflineSmall Offline

I try to validate a simple Form but the Jquery Validation

Plugin not woking when I use only Button not The Submit

Button.
I can not use the Submit button there Because If I use submit

Button After Submitting the form It take the Action and goes

to Default page while my current form is comes from Ajax. I am

very new to Jquery. Please Help its Urgent...
I am giving the files here.
index.html

<html>
<head>
<script src="jquery.js">
<script="jquery-validate-min.js">
<script="validation.js>
</head>
<body>
<form id="contact_form">
<table>
<tr><th>Name</th><td><input name="name" /></td></tr>
<tr><th>E Mail</th><td><input name="email" /></td></tr>
<tr><th><input type="button" name ="submit" id="form_sub"

onclick="save"></th><td><input name="email" /></td></tr>
</table>
</form>
</body>
</html>

Now the validation.js file

function save(){

$("#form_sub").click(function(){
$("#contact_form").validate({
'rules':{
'name':{
'required':true,
'minlength':5
},
'email':{
'required':true,
'email':true
}
}
})
}

Everything works fine when we use input type="submit"...
But it not working when we use input type="button"

I am new to Jquery ... Please Help

28/05/2010
09:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Sorry, but it seems like this is not the correct forum where you post your problem.

We here discuss jqGrid and not validation plugin.

You can use jquery forums

http://forum.jquery.com/

or post to the authors forum

http://bassistance.de/jquery-p.....alidation/

Best Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
33 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information