What’s up guys, anyone seen this before, using rails 2.0.2,
If I put a button on the page and try and call this javascript
function all works well, but if I use rjs to call this javascripot
function that is defined in my layout, I ge the above error, I can
call the same function if it contains something simple like an alert
box, but it seems to freak out on new element(‘div’) which is a
mootools thing.
Any ideas?
my view: call_it.rhtml
<%=render :update do |page|
page << ’ ’
end
%>
my layout
Your title function myfunction(src)
{
container = new Element('div').setStyles({
position: 'absolute',
top: 0,
left: 0,
overflow: 'hidden',
width: '100%',
height: window.getHeight()+'px'
//background: '#00C'
});}
</script>