I have some javascript in a page whereby I can call:

alert(document.getElementById("channelnotes").options
[document.getElementById
("channelnotes").options.selectedIndex].value );

And get the value in a select box on my page (A very complicated
derivation of a select box, which also lets me edit it)

I need that value as a parameter in a link_to_remote call from the
same page:

<%= link_to_remote image_tag("/images/baloon2.gif"), {:url =>
{:controller => 'channels', :action => 'speakass'} , :update =>
'channelnotesfield'},:title => 'Change whereabouts to what shows in
"Notes" (above, right) for the associate listed in the dropdown
below', :type => "submit",:style => "float: left;border-style: ridge;
padding: 1px;" %>

I want to pass the value obtained in javascript as :
document.getElementById("channelnotes").options[document.getElementById
("channelnotes").options.selectedIndex].value

to my link_to_remote call -- in other words, in channels.speakass I
want to be able to pick up the value of this.

I've tried it with :with, as :

:url =>{:controller => 'channels', :action => 'speakass'} , with
=>document.getElementById("channelnotes").options
[document.getElementById("channelnotes").options.selectedIndex].value

But that just gives me an error. Can anyone tell me how I can obtain
this value in the function I am invoking in my link_to_remote. Thanks,
RVince
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to