Some JavaScript code which used to work for IE6 no longer works for IE7. Any ideas what I could try to correct the problem?
The scripts change a user's password by opening a child window, grabbing the old password, new password and user name from the opener, then execute a ASP which performs the database update and then runs JavaScript on the opener to let the user know if the update was successful.
IE7 does not read the values from the opener.
The opener does this :
function openPasswordChild() {
var sw = screen.width;
var sh = screen.height;
var winChild = window.open( 'pw.asp', 'passwordChild', 'width=5,height=7,screenX=50,left="+sw+",screenY=0,top="+sh+",toolbar=no,dependent=yes,resizable=yes' );
if ( winChild != null ) {
winChild.blur();
} else {
alert( 'Password cannot be updated.\nThe window which performs the update cannot be created' );
}
}
The child grabs the data from the opener like so :
function startup() {
var oldpw = window.opener.pwform.oldpw.value;
var newpw = window.opener.pwform.newpw.value;
var usrname = window.opener.mainform.username.value;
.
.
}
The JavaScript fails when it tries to grab the first value from the opener's forms.
I've tried adding some bits of code recommened on other forums, so that the opener does the following :
function openPasswordChild() {
.
.
if ( winChild != null ) {
winChild.opener = self;
winChild.blur();
}
.
.
}
and the child does the following :
function startup() {
var oldpw = window.opener.pwform.oldpw.value;
oldpw = oldpw + "";
.
.
}
But that hasn't helped.
Any ideas, please?
Anthony