1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

two frames - one reloads when offer is completed?

Discussion in 'PHP & Perl' started by marcello, Mar 23, 2009.

  1. marcello

    marcello Registered Member

    Joined:
    Dec 1, 2008
    Messages:
    84
    Likes Received:
    19
    Hi there,

    I have an the following situation. I have an iframe that is blanking the referer. This iframes contains a typical cpa offer.

    Now I want another iframe, that contains a download link but becomes only visible/active when the user completed the offer.

    So how can I do that?

    Thanks!
     
  2. marcello

    marcello Registered Member

    Joined:
    Dec 1, 2008
    Messages:
    84
    Likes Received:
    19
    anyone? I know it's possible ... sharecash is doing for example ... if you complete the offer the download link will displayed / another iframe refreshed or loaded or whatever
     
  3. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    HTML:
    <script type="text/javascript">
    var check = true;
    </script>
    
    <iframe src="http://google.com" onload='if (!check) { alert("WOW") } else { check = false; }'></iframe>
    Just change alert("WOW") to any other script (show or refresh iframe)

    regards
    Cyklotrial
     
    • Thanks Thanks x 1
  4. marcello

    marcello Registered Member

    Joined:
    Dec 1, 2008
    Messages:
    84
    Likes Received:
    19
    Thanks a lot, it's working pretty smooth :) You just made my day!

    I always thought that onload gets called when the iframe loads the first time. But in this case it's get called when the submit is hit. Strange but great anyway!

    Edit: Now I get it - the onload get's called twice and the first time the iframe doesn't react to it.
     
    Last edited: Mar 25, 2009