[thelist] JavaScript Newbie help - targeting links

noah noah at tookish.net
Fri May 25 11:06:45 CDT 2001


>But I can't actually find any JavaScript that closes the little window and
>targets the new link to the main window. Plus, I don't read French, so it is
>rather hard to follow the comments in your code.

I'm no javascript guru, but I'll put this here in hopes that the gurus will 
let me (and you) know if it's bad. It works, though.

The function is:

function changeonclose(location) {
   window.opener.location.href=location;
   parent.close();
}

and it's called by:

a href="javascript:changeonclose('blah.shtml')"

(tag thingies omitted so that this doesn't get flagged as html mail)

Cheers,

Noah





More information about the thelist mailing list