Hello,
My rjs is returning javascript to the browser, as it should. I am
trying to replace the html inside of a div. How do I get it to
display the code and not the script?
Thanks!
Hello,
My rjs is returning javascript to the browser, as it should. I am
trying to replace the html inside of a div. How do I get it to
display the code and not the script?
Thanks!
The answer is to render the partial directly without using rjs at all.
Also, in case anyone searches for this, to do an ajax call from radio
buttons, write a very simple javascript that defines the value of a
hidden field and use the hidden field to feed the value to the
request:
function doMe(value) {
var hide = document.getElementById(‘hiddenType’)
hide.value = value
}
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs