javascript - IE can't see objects in .load DIV Jquery -
I have a loading on one page that loads onclick events on the parent page using the following javascript . It loads into a DIV.
Function Load Communication (Element Selectionor, Sourceal) {$ ("+ + element selector +" ".load (" http://myurl.co.nz/ "+ sourceURL +" ") ;}
Then on another click event (in the new form), one of the fields in the field is populated with a random password
& lt; label & Gt; Password: & lt; / labels & gt; & lt; input type = "text" name = "password"> & gt; input type = "button" value = "Generate password" onClick = "genPwd ()" /> function genPwd () {$ .post ("rpc.php", {method: "genPwd"}, function (data, text Tatus) {JavaScript.Project.value = data.message;}, "json");}
All javascript on page is included on load time.
Chrome and FF are okay with this but IE8 says that document.form.password is not present, I think because it is not in the original page. Any way around it?
< P> Cheers
AFAIK document.form
is deprecated instead you You can use this cross browser solution:
< Code> $ ('# passwordFieldId'). Val (data.message);
Comments
Post a Comment