Forum: Ruby on Rails how to use switchdiv( ) method in views?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
srikanth (Guest)
on 2008-12-17 12:28
(Received via mailing list)
I have four tables called:
video
audio
image
audio
each table ia having differnet parameters.

While iam uploading new stream i can choose  video/audio/image/audio
and i can update corresponding table params;
Here I am using switchdiv() method to do swith between ldifferent
table parameters like below:

                      <select name="content" onchange="switchDiv
(value);">
            <option value="video_parameters">Video</option>
            <option value="image_parameters">Image</option>
            <option value="speech_parameters">Speech</option>
            <option value="audio_parameters">Audio</option>
                      </select>

the above code will create a dropdown box with video,audio,image and
speech params.

Here what i want to do is instead of using "value" param in the above
code i want to use the paarams selected by using below method:
collection_select(:stream, :connenttype_id, @connenttypes, :id, :name)
%>

with this code i am getting dropdown box of video,audio,image and
speech params.
Now if i select "video" parameter from dropdown box ,how to link this
parameter to the
switchDiv(value) method in the place of "value".

Can any one give the suggestions or help to do the same.

thanks
srikanth
This topic is locked and can not be replied to.