[thelist] javascript help
Alberto Domingo
alberto.domingo at uah.es
Mon Jun 27 11:47:05 CDT 2011
If window.opener is NULL, window.opener would evaluate as FALSE in
the if() conditional, so NOT(!) window.opener (!window.opener) is NOT
FALSE, whis is TRUE, so the conditional redirects the page only if
window.opener is NULL
Probably you didn't notice the ! operator.
I included a code with more options in another message.
Alberto
At 18:21 27/06/2011, Bob Schwartz wrote:
>Re-reading it I figured out what happens - as the page loads it
>redirects to the home or any other page I specify - perfect, thanks very much.
>
>
> > Hi Bob,
> >
> > This could do what you describe:
> >
> >
> > <html>
> > <head>
> > </head>
> > <body onload="if(!window.opener)
> document.location.href='http://lists.evolt.org'">
> > Popup contents
> > </body>
> > </html>
> >
> >
> > The same code can be included in a script tag anywhere in the
> head or the body.
> >
> > Alberto
> >
> >
> > At 10:35 26/06/2011, you wrote:
> >> Would someone be so kind as to give me a hand with a simple javascript?
> >>
> >> What I need is a js that checks to see if a pop-up window has
> been opened as a pop-up or not, and if not, write a link.
> >>
> >> i.e - if opener is null, then write http:///www.mulink.com, else
> do nothing.
> >> --
> >>
> >> * * Please support the community that supports you. * *
> >> http://evolt.org/help_support_evolt/
> >>
> >> For unsubscribe and other options, including the Tip Harvester
> >> and archives of thelist go to: http://lists.evolt.org
> >> Workers of the Web, evolt !
> >
> >
More information about the thelist
mailing list