To use JS in RedBox Plugin

Hi All,

I'm using redbox plugin in my app. Redbox plugin is working properly.But when i try to change text box values using js its not working.

The Code is

<input type="text" name="playlist" id="playlist_name">

<input type="radio" name="playlist" onclick="$('playlist_name').value=$('p_name').value "/>Test

<input type="hidden" name="pname" value="test" id="p_name">

Here I'm assigning hidden input value to the text box when clicking radio button. Its working in ordinary page/layout but not in redbox layout.

Hopefully Waiting for your reply

Thanks in Advance Saravanan.K

Saravanan Krishnan wrote:

Hi All,

I'm using redbox plugin in my app. Redbox plugin is working properly.But when i try to change text box values using js its not working.

The Code is

<input type="text" name="playlist" id="playlist_name">

<input type="radio" name="playlist" onclick="$('playlist_name').value=$('p_name').value "/>Test

<input type="hidden" name="pname" value="test" id="p_name">

Here I'm assigning hidden input value to the text box when clicking radio button. Its working in ordinary page/layout but not in redbox layout.

Hopefully Waiting for your reply

Thanks in Advance Saravanan.K

Anything Wrong in my question? Can anyone suggest me..

Thanks

U using in rjs files or in rhtml files?

Ratnavel Sundaramurthi wrote:

U using in rjs files or in rhtml files?

.rhtml files

What you are asking is strictly a js question with no rails aspect. But if I cut and paste your view code into one of my views it appears to work as expected, so maybe something else is giving a local js problem in your browser.

Tonypm