Firefox can't show alert message from javascript/jQuery

hellgawd

New Member
I'm encounter a strange problem about using javascript/jQuery on Firefox. What I hope to achieve is simple, I get a Datasource, and if it was retrieved correctly, there will be a message for alert the operation is successful, while if it is not, it will through an error into console and give a alert to notice that the file is not read.\[code\]jQuery(".add_link").live("click",function(event){ //encode the url sub url param var optUrl=this.href; var queryStr=optUrl.substring(optUrl.indexOf("url=")+4); //Error is a MARKER to tell whether to show the successful alert or another one. var Error = "false"; optUrl=proxySevUrl+"?url="+encodeURIComponent(queryStr); event.preventDefault(); var ds=new DataSource(false,"get",optUrl,"xml",function(data){ //alert("removed"+data); buildWatchListCache(data); },function (xhr, ajaxOptions, thrownError){ //This is the Fail reading alert alert("Unable to add item to watch list. Please try again."); console.log(thrownError); Error = "true"; }); if (Error == false) { ds.getData(); //This is the success alert alert("The lot was successfully added to the watch list."); } }); \[/code\]These alert works fine on all other browsers expect Firefox. There will be no waring that the file is failed to read, while it will always show success alert.Can anyone help? Thanks!
 
Back
Top