www.webdeveloper.com
Results 1 to 2 of 2

Thread: Outgoing link script with iframe not working?

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    100

    Outgoing link script with iframe not working?

    I made an outgoing link script that will open the link in an iframe but unfortunately it doesn't work. I know it will work but obviosuly something is wrong.

    It works by prepending LinkToSite.com with outgoing.php?http://LINKTOSITE.com

    Here is the code I made so far:

    <?php

    $redirect = $_SERVER['QUERY_STRING'].'';

    ?>

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">;
    <html>
    <head>
    <title>Frameset Example Title (Replace this section with your own title)</title>
    </head>

    <frameset rows="200,*" frameborder="0" border="0" framespacing="0">
        <frame name="menu" src="http://www.domain.com/i/frame.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>
        <frame name="content" src="<?php
    echo $_SERVER['QUERY_STRING'];
    ?>" marginheight="0" marginwidth="0" scrolling="auto" noresize>

    <noframes>
    <body>
    <img src="http://www.omain.com/wp-content/uploads/2013/06/logo4.png" /> <p></p>
    You are now being redirected to a merchant website where you can buy the product, view prices and learn more about the product. <p></p> Please wait one moment. <p></p>
    If you aren't redirected within 5 seconds <a href="<?php
    echo $_SERVER['QUERY_STRING'];
    ?>" onClick="_gaq.push(['_trackEvent', 'Merchant Redirect', 'Clicked', 'Clicking on redirect link']);">Click Here</a> to go directly to merchant site.
    <p></p>
    <a href="<?php
    echo $_SERVER['QUERY_STRING'];
    ?>" onClick="_gaq.push(['_trackEvent', 'Merchant Redirect', 'Clicked', 'Clicking on redirect button']);" class="button">Continue to your product without waiting </a> <SCRIPT LANGUAGE="JavaScript">
    setTimeout("location.href ='<?php echo $redirect ?>'",3500);
    </script>
    </noframes>

    </frameset>
    </html>
    Last edited by Nerdygeek; 08-01-2013 at 12:01 PM.

  2. #2
    Join Date
    Feb 2012
    Location
    Tallahassee, FL
    Posts
    280
    I have no idea what your end goal is but this loads in the frame. It's ugly but works and with a little effort could be cleaned up.

    HTML Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>Frameset Example Title (Replace this section with your own title)</title>
    </head>
    <body>
            <!--What is this for?-->
            <!--<iframe name="menu" src="http://www.domain.com/i/frame.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>-->
            <iframe name="content" src="<?php
            echo $_SERVER['QUERY_STRING'];
            ?>" marginheight="0" marginwidth="0" scrolling="auto" noresize>
    
            <img src="http://www.omain.com/wp-content/uploads/2013/06/logo4.png" /> <p></p>
            You are now being redirected to a merchant website where you can buy the product, view prices and learn more about the product. <p></p> Please wait one moment. <p></p>
            If you aren't redirected within 5 seconds <a href="<?php
            echo $_SERVER['QUERY_STRING'];
            ?>" onClick="_gaq.push(['_trackEvent', 'Merchant Redirect', 'Clicked', 'Clicking on redirect link']);">Click Here</a> to go directly to merchant site.
            <p></p>
            <a href="<?php
            echo $_SERVER['QUERY_STRING'];
            ?>" onClick="_gaq.push(['_trackEvent', 'Merchant Redirect', 'Clicked', 'Clicking on redirect button']);" class="button">Continue to your product without waiting </a> <SCRIPT LANGUAGE="JavaScript">
                setTimeout("location.href ='<?php echo $redirect ?>'",3500);
            </script></iframe>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles