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 2 of 2

Thread: iFrames help

  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iFrames help

    Hello,

    I have a website where the header adn footer are located in the index page, i use a javascript as a menu and an iframe to display the main body of the page. The java script calls pages within the iframe.

    I would like to sent an e-mail with a hyperlink to my website, but would like the iframe to display a different source page, not the initial page.

    Is this possible, if so could you please tell me how this can be done!

    Thanks.

    for ref my website is www.wiso.net.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,503
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    I'm thinking that you may have to use a server-side script to set the
    proper page that needs to be loaded into the <iframe>.

    Since the person is entering your site from an email link, the email link
    is going to be a call to a PHP (or Perl) script that sets a cookie and then
    redirects to your main page. Your main page reads the cookie using
    Javascripting and loads the correct HTML into the <iframe>.

    Example ... if you sent me an email, I would see a link like this:
    http://cy.wiso.net/login.php?access=site1.html

    When I click the link, it would run a php script called "login.php".
    That script would set a cookie with a value of "site1.html" and
    then redirect to your main page.

    Using Javascripts, your main page would read the cookie and then it
    would know which page to load.

    ==========================

    You would need to know two things.

    1) How to make a PHP script set a cookie and redirect to another page.
    http://www.websitepublisher.net/article/php_cookies/

    2) How to use Javascript to read a cookie and use that value.
    http://www.google.com/search?hl=en&l...me&btnG=Search
    http://www.developertutorials.com/scripts/7/95/

    Both of these things can be learned by tutorials (search Google).

    ==========================

    If anyone has Javascripting turned off, the method would fail ...
    but then again, you're using Javascripting now anyhow.
    Last edited by mlseim; 12-07-2005 at 02:55 AM.


  •  

    Posting Permissions

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