window.opener problems - IE7

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: May 2008
Posts: 9
Reputation: ajberrow is an unknown quantity at this point 
Solved Threads: 0
ajberrow's Avatar
ajberrow ajberrow is offline Offline
Newbie Poster

window.opener problems - IE7

 
0
  #1
May 20th, 2008
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 :

  1. function openPasswordChild() {
  2.  
  3. var sw = screen.width;
  4. var sh = screen.height;
  5.  
  6. 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' );
  7.  
  8. if ( winChild != null ) {
  9. winChild.blur();
  10. } else {
  11. alert( 'Password cannot be updated.\nThe window which performs the update cannot be created' );
  12. }
  13. }

The child grabs the data from the opener like so :

  1. function startup() {
  2. var oldpw = window.opener.pwform.oldpw.value;
  3. var newpw = window.opener.pwform.newpw.value;
  4. var usrname = window.opener.mainform.username.value;
  5. .
  6. .
  7. }

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 :

  1. function openPasswordChild() {
  2. .
  3. .
  4. if ( winChild != null ) {
  5. winChild.opener = self;
  6. winChild.blur();
  7. }
  8. .
  9. .
  10. }

and the child does the following :

  1. function startup() {
  2. var oldpw = window.opener.pwform.oldpw.value;
  3. oldpw = oldpw + "";
  4. .
  5. .
  6. }

But that hasn't helped.

Any ideas, please?

Anthony
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 2632 | Replies: 0
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC