Posted by mantrid on 09/27/06 12:16
Thanks Johnny
That works but not if popups are blocked
So I was wondering if there is a way of testing if popup blocking is set and
if not run the first bit of code and if so run the second so at least the
user would get the page even if it is not on a separate window ie something
like;
if(isset($_POST['viewtest'])){ ?>
if popup blocking is not set then run the following
<script type="text/javascript">
window.open("http://www.mysite.co.uk/path/mypage.php");
</script>
<?php
else if popup blocking is set run the following
header("Location: http://www.mysite.co.uk/path/mypage.php");
}
"Johnny" <removethis.huuanito@hotmail.com> wrote in message
news:OKmSg.406$UJ2.198@fed1read07...
>
> "mantrid" <ian.dandav@virgin.net> wrote in message
> news:DhiSg.42230$wo3.37618@newsfe7-gui.ntli.net...
> > In some of my script ive been using the followin
> >
> > if(isset($_POST['mybutton'])){
> > header("Location: http://www.mysite.co.uk/path/my.php");
> > }
> >
> >
> > This changes the page in the open browser window. How can I modify this
to
> > open a new window without replacing the parent
> >
> >
> this works:
>
> if(isset($_POST['mybutton'])){
> echo <<<WIND
> <script type="text/javascript">
> window.open("http://www.mysite.co.uk/path/my.php");
> </script>
> WIND;
> }
>
> but as you can se also requires js
>
>
Navigation:
[Reply to this message]
|