javascript - Code only working in IE9 standards, Any way to downgrade? -


the code not work untill manually hit f12, hit document mode: ie9 standards , decides work.(and need fix target audience otherwise hitting f12 100 times day, thats annoying. ) know ie crap sadly have no choice in matter, , target audience doesnt take seconds time change ie9 standards. code (its bookmarklet)

javascript:(function(){     a=document.createelement('script');     a.setattribute('src','//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js');     document.body.appendchild(a);     data='[["#txtapplicantlname","agrawal","text"],["#txtapplicantfname","aayush","text"],["#txtfather","ranjan","text"],["#txtmother","neelam","text"],["#txtpincode","452010","text"],["#txtphone","2147483647","text"],["#txtemail","aayush@mail.com","text"],["#rdosex_0,#rdosex_1","1","radio"]]';     for(a=$.parsejson(data),b=a.length-1;0<=b;b--){         c=a[b];         if (c[2] == 'text') {             console.log(c);             $(c[0]).val(c[1]);         } else if (c[2] == 'radio'){             rdata = c[0].split(',');             rnum = c[1] - 1;             select = rdata[rnum];             $(select).prop('checked', true);             console.log(select);         }     } })(); 

note: in case wondering, data variable being passed in json because bookmarklet generated dynamically. website operates upon https , hence cannot make ajax calls server or blocked. job pretty fillup web-forms, generates unique bookmarklet each time that. other browsers work fine internet explorer loves breaking down.. code worked otherwise before added radio buttons code, guessing has .prop since mentions in console..

ie not understand console.log until console open. fix change console.log

window.console && console.log(...) 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -