Reputation: 6469
I am having some problems with Prototype's Ajax.Request, if I do the following, the request won't even be made:
<input name="Update" onclick="var req = new Ajax.Request('/agent/reports/update_chart', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form), onComplete:function(transport) {alert("TEST");}}); return false;" type="button" value="Update" />
But, if I remove the onComplete, like so, it will make the request:
<input name="Update" onclick="var req = new Ajax.Request('/agent/reports/update_chart', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form)}); return false;" type="button" value="Update" />
What am I missing here? I am using Prototype 1.5.0.
Upvotes: 0
Views: 858
Reputation: 140195
The double quotes in the alert("TEST") make an HTML syntax error, you need to use single quotes here
Upvotes: 1