should be interchangeable.

When i wrote this, i didn't want to show the real url up in browser, so i used 
base64 encoding.

Sascha

Am Sonntag, 6. Oktober 2002 23:52 schrieb Adriano:
> I understand and thank you Sascha.
> Curiosity: why do you use the 'base64_encode' function to send querystring
> arguments? I'd rather used urlencode...
>
> "Sascha Cunz" <[EMAIL PROTECTED]> ha scritto nel messaggio
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> To produce such a JavaScript:
>
> define('_DOMBASE', 'http://yourdomain.com');
>
> echo '<SCRIPT language="JavaScript" type="text/javascript">'."\n"
>     .'if (document.location == top.location)'."\n"
>     .'  top.location="'._DOMBASE.'/index.php?goto='
>        .base64_encode($_SERVER["REQUEST_URI"]).'";'."\n"
>     .'</SCRIPT>';
>
> where the index.php works like:
>
> <? if (!isset($_GET['goto']))
>      $goto = "home.php"; else
>      $goto = base64_decode($_GET['goto']);
> ?>
> <FRAMESET>
>   <someframes>
>   <FRAME src="http://yourdomain.com/<? echo $goto; ?>">
> </FRAMESET>
>
> As Stephen reported me recently, this also works with iframes.
>
> Sascha
>
> Am Sonntag, 6. Oktober 2002 21:37 schrieb Adriano:
> > Hi people,
> >
> > @ Edwin wrore:
> > > 'Not really sure, but perhaps, with Javascript.
> > >
> > > But I'd rather recommend you to give up iframes... ;)
> >
> > Can you post an example of Javascript code checking for _parent frame?
> > By the way, what's wrong with iframes?
> > bye,
> > Adr


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to