Hi,


i am using jquery validation, i used following code

$("#btn1").click(function(){

alert("click");
$("#validating").valid({
rules: {
"product_no":{
required: true
}
},
messages: {
"product_no":{
required: "Required"
}
}
}).element( "#bar-div" );
});

in order to handle validation by particular button i used button id
btn1 and validate will not work
inside button click so i am using valid
1) it is not showing according to rules,message

2) element("#bar-div") is not working, its validating whole form as i
gave :class => :required in all textbox

is that any way to validate particular div with click action of button
for displaying validation messages

thanks,
-pab

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 21, '11 at 2:43p
activeSep 21, '11 at 2:43p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Pab: 1 post

People

Translate

site design / logo © 2021 Grokbase