Subject: | postBody and evalScripts breaks link_to_remote |
This code against 1.33:
my $loading = $c->prototype->update_element_function( 'acomp_stat', { action => 'update', position => 'bottom', content => 'Loading Users...' } );
my $complete = $c->prototype->update_element_function( 'acomp_stat', { action => 'update', content => '' } );
print $c->prototype->link_to_remote( "A", { url => "/emplistajax/A", loading => "$loading", update => 'users', complete => "$complete" } );
Produces:
<a href="#" onclick=" new Ajax.Updater( 'users', '/emplistajax/A', { asynchronous: 1,onLoading: function(request){new Insertion.Bottom( 'acomp_stat', 'Loading Users...' )
},onComplete: function(request){$('acomp_stat').innerHTML = ''
} } ) ; return false">A</a>
Against 1.34 it produces:
<a href="#" onclick=" new Ajax.Updater( 'users', '/emplistajax/A', { asynchronous: 1,onLoading: function(request){new Insertion.Bottom( 'acomp_stat', 'Loading Users...' )
},evalScripts: ,postBody: ,onComplete: function(request){$('acomp_stat').innerHTML = ''
} } ) ; return false">A</a>
The evalScripts and postBody options are causing this JavaScript error in Firefox 1.0.5:
Error: syntax error
Source File:
Line: 1, Column: 15
Source Code:
},evalScripts: ,postBody: ,onComplete: function(request){$('acomp_stat').innerHTML = ''