jeudi 7 mai 2015

Callback is calling at last in javascript in Chrome

I have a function which is being called at body onload() and that function will call another function callback,but last function is being called after form submit only in Chrome.Other browsers its working fine.Can anyone please tell me how to resolve this

Code Snippet:

init(){
a();
document.form.submit;
}

function a(){
//including client.js
client=new client();
client.loadflash(readycallback);

}

//calling at last after form submit in case of Chrome because of which value of a is not set at all
function readycallback(){
var a=2;
document.form.a.value=a;
}

Aucun commentaire:

Enregistrer un commentaire