Hi Charanya,

Or try using unobtrusive JavaScript by giving the field a unique id and 
then hooking up the action to that id. With jQuery it is very simple.

To get the field just use:

$('#uniqueid')

and then you can chain any function to the element.

HTH,
Schalk

Charanya Nagarajan wrote:
> <script type="text/javascript">
> function changecase()
> {
>  
> (document.getElementById("sometext")).value=document.getElementById("sometext").value).toUpperCase();
> }
> 
> 
> </script>
> 
> <%= text_field_tag(:sometext, nil, :size => 14 , :onchange => 
> "changecase();") %>
> 
> When u enter the text in the textbox and when the focus goes out of the 
> textbox the text changes to uppercase.
> 
> Hope this might help.

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn:Schalk Neethling
n:Neethling;Schalk
org:Overt Strategy Consulting
adr:Florauna;;Berg ave 642;Pretoria;Gauteng;0182;South Africa
email;internet:sch...@overtstrategyconsulting.com
title:President
tel;work:+27125468436
x-mozilla-html:FALSE
url:http://www.overtstrategyconsulting.com
version:2.1
end:vcard

Reply via email to