Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: location.replace being ignored


Message #1 by "Pat Waddington" <paw@s...> on Fri, 14 Dec 2001 10:30:48 -0000
It's a weird world...

Good thing it worked, though!

/Robert


-----Original Message-----
From: Pat Waddington [mailto:paw@s...] 
Sent: den 17 december 2001 16:17
To: javascript
Subject: [javascript] RE: location.replace being ignored


Robert, that worked fine.

Thanks a lot.

However, I'd love to find out why location.replace appears to be so
unstable.

Best regards
Pat
----- Original Message -----
From: "Nyman, Robert" <Robert.Nyman@i...>
To: "javascript" <javascript@p...>
Sent: Monday, December 17, 2001 10:08 AM
Subject: [javascript] RE: location.replace being ignored


> Sure thing, Pat!
>
>
> BTW, does this happen with below code:
>
> location.href = yourNewURL;
>
>
> /Robert
>
>
> -----Original Message-----
> From: Pat Waddington [mailto:paw@s...]
> Sent: den 17 december 2001 11:05
> To: javascript
> Subject: [javascript] RE: location.replace being ignored
>
>
> Dear Robert,
>
> Thank you for continuing to mull this over. I tried your suggestion and
this
> time got an Error 404 page!! It was at least trying to find the right
page!
>
> However, the page definitely exists (you actually have to go through it to
> get to the page under test) and the name is definitely correct as I copied
> and pasted it from the folder listing entry.
>
> Just out of curiosity, I put the alert back in and got the same result.
>
> Very strange.
>
> Thanks for you continuing help.
>
> Regards
> Pat
> ----- Original Message -----
> From: "Nyman, Robert" <Robert.Nyman@i...>
> To: "javascript" <javascript@p...>
> Sent: Monday, December 17, 2001 9:05 AM
> Subject: [javascript] RE: location.replace being ignored
>
>
> > Pat,
> >
> > just one small guess:
> >
> > Try and comment out the alert and see if it works...
> >
> >
> > /Robert
> >
> >
> > -----Original Message-----
> > From: Pat Waddington [mailto:paw@s...]
> > Sent: den 15 december 2001 01:02
> > To: javascript
> > Subject: [javascript] RE: location.replace being ignored
> >
> >
> > Thanks to all for your suggestions. I've tried them all out and
> > double-checked everything with no improvement. Just one of life's little
> > mystery I guess. I did have this happen once before when I was very new
to
> > JS and thought it was just me getting things wrong, but I've used
> > location.replace many times since then without problems.
> >
> > I shall shelve this for now, as an alternative is available, and come
back
> > to it later when I have more time.
> >
> > Again, thank you all for your help.
> >
> > Pat
> >
> > ----- Original Message -----
> > From: <KATHLEEN.M.WHALEN@c...>
> > To: "javascript" <javascript@p...>
> > Sent: Friday, December 14, 2001 5:13 PM
> > Subject: [javascript] RE: location.replace being ignored
> >
> >
> > > Hate to say this, but I put this code into a page of mine and it works
> > > perfectly.   I'm also using PWS and IE 5.5
> > > I don't see anything wrong with it.
> > > I would recommend you do a search on your page for "endmessages" and
> make
> > > certain you don't have this script somwhere else on the page
cancelling
> it
> > > out.
> > > ==================================
> > > This is the code:
> > >
> > > <script language="javascript">
> > > function EndMessages()
> > > {
> > > alert ("The password has been updated");
> > > location.replace("AdminMenu.asp");
> > > }
> > > </script>
> > >
> > > The HTML is:
> > > <body onLoad="EndMessages()">
> > >
> > > The pages are running on PWS, using IE5.5. I have identical code in
> other
> > > pages which doesn't cause any problems. I've even deleted and retyped
> > > everything just in case I had a hidden character in there.
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Pat Waddington" <paw@s...>
> > > 12/14/01 12:00 PM
> > > Please respond to "javascript"
> > >
> > >
> > >         To:     "javascript" <javascript@p...>
> > >         cc:
> > >         Subject:        [javascript] RE: location.replace being
ignored
> > >
> > > This is the code:
> > >
> > > <script language="javascript">
> > > function EndMessages()
> > > {
> > > alert ("The password has been updated");
> > > location.replace("AdminMenu.asp");
> > > }
> > > </script>
> > >
> > > The HTML is:
> > > <body onLoad="EndMessages()">
> > >
> > > The pages are running on PWS, using IE5.5. I have identical code in
> other
> > > pages which doesn't cause any problems. I've even deleted and retyped
> > > everything just in case I had a hidden character in there.
> > >
> > > Thanks
> > > Pat
> > > ----- Original Message -----
> > > From: Nyman, Robert
> > > To: javascript
> > > Sent: Friday, December 14, 2001 10:33 AM
> > > Subject: [javascript] RE: location.replace being ignored
> > >
> > > This should work.
> > > Please show us your code...
> > >
> > >
> > > /Robert
> > >
> > > -----Original Message-----
> > > From: Pat Waddington [mailto:paw@s...]
> > > Sent: den 14 december 2001 11:31
> > > To: javascript
> > > Subject: [javascript] location.replace being ignored
> > >
> > > Can anyone tell me why this location.replace statement is being
ignored?
> > > The page exists, it's in the same folder, but the line is simply being
> > > ignored. It doesn't throw an error, and when I put an alert
immediately
> > > after it I got the message box.
> > > location.replace("AdminMenu.asp");
> > > Thanks
> > > Pat
> > > $subst('Email.Unsub').
> > > $subst('Email.Unsub').
> > > $subst('Email.Unsub').
> > >
> > >
> > >
> > $subst('Email.Unsub').
> > >
> >
> >
> >
> $subst('Email.Unsub').
> >
> $subst('Email.Unsub').
> >
> >
>
>
>
$subst('Email.Unsub').
>
$subst('Email.Unsub').
>
>




  Return to Index