<HTML>
<HEAD>
<script type="text/javascript">
function validate(){
if(document.getElementById('first_name')=="")
alert("First name can't be blank");
}
</script>
</HEAD>
<BODY>
<% form_tag({:action => "create"}, {:onsubmit => "return validate();"}) %>
First name: <input type="text" name="first_name" id="first_name">
<% end %>
</BODY>
</HTML>
I hope it will help
On Wed, Sep 9, 2009 at 2:31 PM, HUNT HUNT
<[email protected]>wrote:
>
> I put the code but the result coming is that no action is performed on
> click the button.
>
> I haven't found relevant information in google.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Thanks and Regards
___________________
Puneet Pandey
Ruby on Rails Developer
http://www.puneetitengineer.wordpress.com
In Puneet's Lab: http://www.puneetpandey.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
-~----------~----~----~----~------~----~------~--~---