I have this
<a href="#" id="preview_button"></a>
And I want the link to be replaced with an actual link.
So i figured I use this
page.replace_html("preview_button","<a href='/preview/#{@object.name.to_url}' class='preview' onclick='window.open(this.href);return false;'>Preview</a>")
but when I use the inspecter with chrome, it tell me
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
so... ideas?