Topic: how to use jquery in erb

hi all,

<%= link_to "downlod",{:controller => "weibo",:action => "statuses_download",
           :content => "$('#add').html();"},:onclick =>"alert('hi');"%>

"$('#add').html()" just a string, how to run this in erb?

many thanks

i am a rails rookie

Re: how to use jquery in erb

What do you exactly want to do?

Re: how to use jquery in erb

rubytree wrote:

What do you exactly want to do?

i want to deliver a string to my controller ,that string is the content of div : $("#content").val , i dont know how to get value of div in erb!

maybe my idea is wrong, how to make it works in other way?

thanks....

i am a rails rookie

Re: how to use jquery in erb

i.e. <input type="text" value=document.getElementById('div_id').innerHTML>