Or location.href =3D "mynewurl.html";
/Robert
-----Original Message-----
From: Greg Griffiths [mailto:greg2@s...]
Sent: den 12 februari 2003 22:33
To: JavaScript HowTo
Subject: [javascript_howto] Re: Passing parameters to location.href
change the entire
subWin=3D
line to
document.location=3D"mynewurl.html";
At 20:21 12/02/03 +0000, you wrote:
>I have a routine that passes a link to a function that will open the
>link in a new window. I'd like to modify this so that the link is
>opened in the same frame using the location.href method. Below is the
>function that opens a new window, but simply substituting the location
>statement isn't working.
>
>function jumpImg(obj) {
> if (document.images) {
> if (obj.blur) obj.blur(); // remove marquee in
ie
> if (destAr[imgNum].indexOf('javascript:')!=3D-1)
> eval(destAr[imgNum]);
> else {
> if (subWin && !subWin.closed) subWin.focus();
> // add or remove window elements as needed
>(i.e., scrollbars, etc.)
> // no spaces between them!
> subWin =3D window.open(destAr
imgNum],"subWin",
>"menubar,location,scrollbars,resizable,height=3D"+subWinHt+
>",width=3D"+subWinWd+",top=3D"+subWinTop+",left=3D"+subWinLeft);
> }
> }
>}
>
>Any ideas?
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to
>unsubscribe send a blank email to