<HTML>
<HEAD>
<script type="text/javascript">
function validate(){
if($('search').value==''){
alert("Please enter keyword(s) to search.");
return false;
}
else{
return true;
}
}
</script>
</HEAD>
<BODY>
<% form_tag ({:action=>'create'}, {:onsubmit=>'return validate()'}) do %>
<input type="text" name="search" id="search">
<% end %>
</BODY>
</HTML>
I am sure this time it will surely help you
On Wed, Sep 9, 2009 at 5:01 PM, HUNT HUNT
<[email protected]>wrote:
>
>
>
> Hey Puneet, The code which u send I tried with that......it is not
> validating
> instead it goes blank page saying undefined template.
>
> THanks
> Hunt
> --
> 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
-~----------~----~----~----~------~----~------~--~---