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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E38118c6d20b4544e424fd700571e090?d=identicon&s=25 srikanth (Guest)
on 2008-12-17 11:28
(Received via mailing list)
I have four tables called:
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
            <option value="video_parameters">Video</option>
            <option value="image_parameters">Image</option>
            <option value="speech_parameters">Speech</option>
            <option value="audio_parameters">Audio</option>

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.

This topic is locked and can not be replied to.