#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Chicago, USA
    Posts
    73
    Rep Power
    14
    On a site that doesnt use frames, how can I accomplish the following...

    When a link to an external site is clicked, I want the link to point to a page in my site with a top frame and then redirect it to the external page. Can someone pleeeese point me in the right direction...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    41
    Rep Power
    15
    First, create a file called framed.php, and the usage would be:

    framed.php?url=http://www.somesite.com

    Now for the contents of framed.php

    --------------------------------
    <html>
    <head>
    <title>Your Title</title>
    </head>

    <frameset rows="50,*" border="0" frameborder="no" framespacing="0">

    <frame src="top.php" scrolling="no" noresize">
    <frame src="<?=$url?>">

    </frameset>

    </html>
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Chicago, USA
    Posts
    73
    Rep Power
    14
    I tried what you said but I get a parse error that shows only in the source code of framed.php
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    Unfortunately if you used this code to a tee you would get an error see thye line that is commenete don below:

    <html>
    <head>
    <title>Your Title</title>
    </head>

    <frameset rows="50,*" border="0" frameborder="no" framespacing="0">

    <frame src="top.php" scrolling="no" noresize">
    //This line should actually be the one below it <frame src="<?=$url?>">
    <frame src="<? print $url; ?>">

    </frameset>

    </html>
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    63
    Rep Power
    14
    "<?=" is valid as long as you have configured PHP to use ASP Style Tags.

    (see http://www.php.net/manual/configuration.php) If you set asp_tags in php.ini file (added in version 3.0.4), you can use "<%=" or "<?=" instead of echo or print.

    [This message has been edited by chris22 (edited October 27, 2000).]
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    41
    Rep Power
    15
    One list little problem

    <frame src="top.php" scrolling="no" noresize">

    Get rid of the quote after noresize
  12. #7
  13. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Chicago, USA
    Posts
    73
    Rep Power
    14
    Ok, that was easy enough...I have another problem though. The links that I am passing through the url variable are URL encoded and the url variable isnt printing the whole link. How can I get around this? Thanks

Similar Threads

  1. mail() ... pulling my freakin hair out !!!
    By grfxguru in forum PHP Development
    Replies: 13
    Last Post: January 29th, 2004, 03:54 AM
  2. IE6 not rendering correctly! (pulling my hair out)
    By abunch in forum HTML Programming
    Replies: 7
    Last Post: December 16th, 2003, 09:49 PM
  3. Hair Pulling & Cookies
    By chet horchem in forum PHP Development
    Replies: 0
    Last Post: June 30th, 2002, 10:23 PM
  4. pulling my hair out over these apache changes
    By hjkl in forum Apache Development
    Replies: 1
    Last Post: June 6th, 2002, 01:42 AM
  5. Pulling out hair getting gd work on win2k
    By casinoman12 in forum PHP Development
    Replies: 6
    Last Post: February 3rd, 2002, 07:52 PM

IMN logo majestic logo threadwatch logo seochat tools logo