Hi,
I have a drop down select which fires an ajax call once selected.
So when i select anything in the email_seperator drop down it fisre the
ajax event below.
<%= observe_field('email_seperator',
:on => 'click',
:url => {:controller => 'possible_emails', :action =>
'update_email'},
:with => "'email_seperator='+$F('email_seperator')",
:before => "Element.show('spinner')",
:success => "Element.hide('spinner')") %>
What i want is when the page first loads for this ajax event to fire
once so the correct information is diaplyed. Ive tried something like
the below but it works for focus but not for click
<%= javascript_tag render(:update) { |page|
page['email_seperator'].focus } %>
<%= javascript_tag render(:update) { |page|
page['email_seperator'].click } %>
Can anyone help??
JB
--
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
-~----------~----~----~----~------~----~------~--~---