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

redirect addy won't "shake" after nav away from LP?

Discussion in 'Cloaking and Content Generators' started by halifax123, Jun 15, 2010.

  1. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    I'm using a landing page and I have it redirected by using a standard
    redirect (short url if you will).......

    the chain should go like this

    person clicks on "redirectpage.com" which is actually my LP

    in the url as long as they remain on my LP "redirectpage.com"
    stays in the url (fine that ok, no problem)

    BUT
    once you click a link on my LP(affiliate link),
    you've clicked a link that takes you to the main affiiliate
    which is a totally different site, which I prefer because this way
    the "https" which is part of my affiliate link displays in the
    address bar, and they are more likely to lay their CC down
    because they see the "https" as part of my affiliate link,
    to that's fine and as it should be(I want my affiliate link
    to display at this point) ..

    PROBLEM

    the original "rediectpage.com" stays in the url! even though
    they have now been taken to a totally different site with a
    totally different url! arrggghh~~!

    the original "redirectpage.com" doesn't go away???

    anyway with code I can "shake" the redirect? so once you click away from
    the LP, it loses the original "redirectpage.com" in the address bar?
    and simply shows the new address for the new page you've clicked to?

    (opens in the same window, to avoid "pop up" blockers)

    any suggestion?

    hali~
     
  2. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    Probably best if you could setup a demo for us to look at, but I'm guessing you're just using iframes in which case you would need make your affiliate link open in a new window (with target="_blank").
     
  3. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    thanks for the help, maybe the "dream" of ising the same window creates the problem

    I haven't created any "iframes" but looking in the code I see
    the redirect or the orginal host did!

    anyway to still have it open in the same window?
     
  4. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    Well you could add an iframe buster to the head of your page:

    Code:
    <script>if (parent.frames.length > 0) top.location.replace(document.location);</script>
     
  5. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    right,

    do I put

    <script>if (parent.frames.length > 0) top.location.replace(document.location);</script>


    that at the extreme top ahead of anything else? (nearest the top is "<html>")

    and if I may ask exactly where do I put the (with target="_blank")
     
  6. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    The <script>...</script> usually goes just before the closing head tag </head> but tbh it really doesn't matter that much.

    target="_blank" needs to be added to the a element of your link. For example: <a href="http://affiliatelink.com" target="_blank">Click Here</a>

    It really would be best if you could show us a live example of what you're trying to do and why.
     
  7. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    thank you right!


    you solved it with the script!

    I really appreciate your help right! now I know why they call you "right"
    you were right!!

    :cheerlead:whee:
     
  8. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    right,

    or anyone else, I do have one more question if I may;

    I found this script online

    this was suppose to conceal the url of what you are about to
    "click" and hide it so that you don't see what site you are about to
    be lead to...I'd like to use it but it didn't work? but then again
    I already had another command in the href;

    The target="_parent" helps keep the
    same window when opening, I had to do that because of the iframe
    and redirect.... Can I somehow still use or get the benefit of
    the "no mouse over, hide from status bar"???

    if I adjust the code slightly??? or the order of the code?? I'm not sure

    thanks!!!

    hali!~ (any info very much appreciated)

    I just noticed that the "mouse hide over" works in "IE" (yehhhh!!) but not in
    firefox, maybe I can't have everything?
     
    Last edited: Jun 16, 2010
  9. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    Sorry, changing the status bar message is pretty much impossible with newer browsers.

    However, I do have a sneaky solution!

    HTML:
    <a href="http://google.com" onclick="this.href='http://yahoo.com'">http://google.com</a>
    The above code is fairly self explanatory, when you hover over the link it will show google.com because that is what's set as the href however onclick changes it to yahoo.com so that you'll be sent there instead.

    FYI the order of code shouldn't matter regarding the target="_parent".

    Last note, most of what's in this thread won't work if your user doesn't have javascript enabled. You should create noscript options similar to the following for those users:
    HTML:
    <noscript><a href="http://whatever.com">Click Here To Continue</a></noscript>
     
    Last edited: Jun 16, 2010
  10. halifax123

    halifax123 Power Member

    Joined:
    Aug 5, 2008
    Messages:
    594
    Likes Received:
    66
    Location:
    uranus
    thanks right!!

    interesting......

    it from what you're saying as long as I put "noscript" (open and closed)on the front and back end of the "href" it should allow for those that don't have javascript enabled?

    I started to try it on the LP and when I went to "preview" to see how it looks, it completely removed (or maybe I should say it was no longer "visible" except in the code) the link altogether, I put it just like you showed front and back??

    am I doing something wrong?
     
  11. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    Yes. :)

    <noscript></noscript> Only needs to be placed on the page once. You can't place a noscript element inside an a element's code.

    Funnily enough another bhw thread has just appeared with a slightly more eloquent solution (regarding the status bar) which gets rid of the <noscript> problem altogether.

    http://www.blackhatworld.com/blackh...g-true-link-displayed-browser-status-bar.html

    Place the following code just before the </body> tag:

    HTML:
    <script type="text/javascript">
                    _links = document.getElementsByTagName("a");
                    for(i=0;i<_links.length;i++) {
                        if(_links[i].name) {
                            docloak = function() {
                              _cloak = this.href;
                              this.href = this.name;
                              this.innerHTML = _cloak;
                             };        
                             _links[i].oncontextmenu = docloak;                 
                            _links[i].onclick = function() {
                             docloak();
                             if(!/thickbox/.test(this.className)) {
                              window.location = this.name;
                             } 
                             return false;
                             };                         
                             _tmp = _links[i].href;
                            _links[i].href = _links[i].name;
                            _links[i].name = _tmp;
                        }
                    }
    </script>
    Then for your links do the following:
    HTML:
    <a href="http://google.com/" name="http://yahoo.com">Visit yahoo.com</a>
    
    Whatever you put as the name will be displayed in the status bar (so in this case http://yahoo.com).