Wap Addon wrote: > Hello Guys > i want to use external validation i mean javascript validation but > whenever click on create i mean (add new record submit)that time my > first text box is black then it give me alert but when i click on 'ok' > it redirect to controller and give error not focus on same text box.
Whoa, take a step back here and slow down so that we can understand you. That's one of the longest run-on sentences I've seen in my life. You want to use javascript validation because you are using something like a form_tag correct? Which tag are you using to start with? Start with providing the basics of what you have, show some initial code for the piece you are having issues with. You do not have to use javascript validation on external pieces. I have created custom validation methods for pieces like form_tag, etc. The larger question is you mentioned a create or a submit to add a record, which tells me that you are adding it into a database. If that is the case then your validations should be performed in the model, not with javascript. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

