SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Feb 2001
    Posts
    302
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As some people switch off javascript when they surf the net I was wondering if the javascript below (which forces a page into a frameset) could be replaced with a PHP script so everyone would be moved into the frameset wether they had javascript on or off.

    <script language=javascript type="text/javascript">
    <!-- Hide script from old browsers

    if (top.location == self.location) {
    top.location.href = "frameset2.html"
    }
    // End hiding script from old browsers -->
    </script>

    Thanks for any help - Neil

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would be nice to know if anybody can use php, a server-side script language, can do anything such as this for client-side language javascript, but I doubt it.
    Last edited by johnn; May 5, 2001 at 17:03.

  3. #3
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you could do is something like this:
    PHP Code:
    <?php
    if (!$blah){
        
    Header("Location: frameset2.html?url="basename($PHP_SELF));
    }
    ?>
    Then in your frameset check for $url and if it exists make the url of the frame be $url ."?blah=1"

    I think that would work.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •