RE: Parameter Passing

by Klaas De Waele <klaas(at)gracegraphics.be>

 Date:  Thu, 4 Oct 2001 11:24:07 +0200
 To:  "'David.Artiss(at)boots.co.uk'" <David.Artiss(at)boots.co.uk>
 Cc:  "'hwg-techniques(at)hwg.org'" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
> Hi Klaas !
> 
> Your script doesn't actually appear to work and it's the same 
> problem I've been
> having.
> 
> location.search.substring does not contain anything when it 
> reaches the
> redirect.html script and I can only assume this is because 
> I've started up
> redirect.html using window.open.


---- Does seem to work here, though I've heard some browsers only can do
this when coming from an external location (server).  Could be totally wrong
or misunderstood on my behalf, but it all works as a charm here (IE5.5 NT4
SP5) ----


> Here are the two versions....
> 
> <a href="redirect.html?url=/">Click here</a>
> 
> <a href="javascript:void(0);" onClick=
> "javascript:window.open('redirect.html?url=/'
> ,'External','width=300,height=200');"
> >Click here</a>

> so... presuming you're linking to 
> redirect.html?url=http://www.fiatcoupe.net
> just put this in your redirect.html
> 
> <script>
> var query = location.search.substring(1);
> pairs = query.split("=");
> document.write('<a href="' + pairs[1] + '" target=_blank>Yes</a>');
> </script>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.