How to use switchdiv( ) method in views?


#1

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);">
Video
Image
Speech
Audio

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