Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Special Code required? Frameset Linking

    I have a website that uses frames. For Search engine optimization reasons I have a number of pages that are not in frames.

    My question is this:

    How can I link from the regular (no frame) pages back to the main frameset while loading custom pages to the midframe frame source?


    <html>
    <head>
    <title>Photography</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <frameset rows="9*,101,367,40,71*" cols="*" framespacing="0" frameborder="NO" border="0">
    <frame src="toptop.html" name="topFrame1" scrolling="NO" noresize >
    <frame src="top.html" name="topFrame2" scrolling="NO" noresize >
    <frame src="main_page.html" name="midFrame">
    <frame src="bottom.html" name="bottomFrame1" scrolling="NO" noresize>
    <frame src="bottombottom.html" name="bottomFrame2" scrolling="NO" noresize >
    </frameset>
    <noframes><body>
    </body></noframes>
    </html>


    So basically I'd like to externally link to this frameset page but instead of it loading the "main_page.html" in the frame source called "midFrame" I would like it load a different page in there say "portrait_page.html"

    Is this possible and does it require some special type of script or coding?? I can't seem to figure it out.

  • #2
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Javascript Maybe?

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yes javascript. You would need to check to see if the page is in a frame or not. If its not in a frame then redirect to your frameset. To load the page the user was viewing you would need to set a cookie, to get the page url and then read it on the frames page checking to see if the cookie exists unfortunately I haven't been able to find a script online that does this. I ran across one once but can't find it anymore. I'm also not about to write a custom script for you either. Here are some links that might help though
    http://quirksmode.org/js/cookies.html
    http://www.javascriptkit.com/script/...epframes.shtml
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I'm going back to pages that viewers have nessesarly viewed already., so I'm not sure the Cookies woudl be the way to go.

    I have multiple links going from a page that certainly is not in frames and linking to a frameset, The only thing is I want to be able to load the frameset and the ability to load seperate pages inside one of the frames.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yes cookies would be the way to go because you would need to make a cookie that tells the browser what page the user visited outside of the frameset. Then on the frameset page you check for the cookie, if its there then you redirect them to the cookie value. I've told you what you have to do, now its up to you to figure out how. I gave you the resources you needed as well. Good luck. No one is going to write this script for you from scratch.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Uhh,, I don't recall asking you or anyone to write me a custom code so please don't make it seem like I'm begging you to work for free.

    In cases like these usually someone has ran into this problem before and just pastes up some code they've used and I would arrange it to fit my page

    I thank you for your "resourses", One link didn't work and the other (although generally useful) addresses a different issue from the one I stated.

  • #7
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Ok everyone, lets remain calm, Aero wasn't being rude.

    IMHO, the best way to receive help around here is not to come in with 4 posts and let the forums #1 member have it with both barrels!



    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by Imperial_T View Post
    Uhh,, I don't recall asking you or anyone to write me a custom code so please don't make it seem like I'm begging you to work for free.

    In cases like these usually someone has ran into this problem before and just pastes up some code they've used and I would arrange it to fit my page

    I thank you for your "resourses", One link didn't work and the other (although generally useful) addresses a different issue from the one I stated.
    http://www.quirksmode.org/js/cookies.html is the correct url. The second link will redirect any page opened out of the frameset to the index page. I told you would need to customize it by creating and reading cookies.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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