Advice Articles

  • Beginners
    Just getting started? Loads of powerful advice here for beginners.
  • Intermediate
    Got a handle on the basics? Find more advanced topics covered here.
  • Advanced
    Warning! Advanced topics covered here.
  • Affiliate resources
    Affiliate marketing resources for affiliates and affiliate program managers tools, websites, books and articles.
  • Product reviews
    Candid reviews of the latest products to take you to the next level.


 

Affiliate Marketing Forum

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups   RegisterRegister ProfileProfile  Log in to check your private messagesPrivate Messages Log inLog in  
Need help getting banner to open new window

Affiliate Marketing Forum Index -> Do-It-Your-Selfers
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
DiTryin



Joined: 28 Sep 2007
Posts: 2

PostPosted: Fri Sep 28, 2007 7:14 pm    Post subject: Need help getting banner to open new window Reply with quote

Hi all!

I'm new here and I did search for this topic on this forum but couldn't find it, so if it's been asked already, please forgive!

I want to put an affiliate banner at the bottom of every page of my site and the code for it looks like this:

Code:

<script src=http://www.bluehost.com/src/js/MyID/CODE33/300x50/1.gif></script>

But when you click on it, you leave my site and go to theirs. I don't want to let my visitors escape so how can I make it open in a new window?

I asked their tech support and they said I have to be careful not to mess up their cookie (Can't let THAT happen!!) so I've spent all day trying to figure out what to do.

I found a java script that looks like this:

Code:

<a href="javascript:void(0)" onclick="window.open('http://website.com','Bravenet.com', 'width=200,height=200')">
Open a New Window
</a>


where you replace the 'bravenet.com' with the URL you want but I'm wondering if that would screw up the cookie?

I read a post on here about htaccess and found tutorials so I might be able to make a redirect work.

Or does anyone have an easy fix that I haven't discovered yet?

Thanks a bunch!!

Diane
Back to top View user's profile Send private message
Scarecrow



Joined: 25 Oct 2007
Posts: 1

PostPosted: Thu Oct 25, 2007 8:49 pm    Post subject: Re: Need help getting banner to open new window Reply with quote

DiTryin wrote:
I want to put an affiliate banner at the bottom of every page of my site and the code for it looks like this:

Code:

<script src=http://www.bluehost.com/src/js/MyID/CODE33/300x50/1.gif></script>


But when you click on it, you leave my site and go to theirs. I don't want to let my visitors escape so how can I make it open in a new window?


Hello!

The problem you're encountering stems in part from
the way in which the JavaScript that's powering the
banner ad was engineered.

It took me less than a minute to discover this within
the code snippet you provided:

Code:

document.write('<a href=http://www.bluehost.com/track/MyID/CODE33 target=_top>


Notice how the "target" is pointed to "_top"? Were
that to be changed to "_blank" or "_new" the desired
effect of having a new browser window opened would
be achieved. I'm reluctant to post a tutorial on how
to directly "hack" (in the white hat sense of the
word) their code to make it work for you out of
respect for the way they decided to engineer their
system. But if you're especially desperate to achieve
the result you're seeking, send me a PM on this
forum and I can try to point you in the right
direction.

Sorry that I couldn't be more helpful in this post,
but I trust you've gotten some value from this.
_________________
adpole* { Free Clickbank Affiliate Widget }
Back to top View user's profile Send private message
DiTryin



Joined: 28 Sep 2007
Posts: 2

PostPosted: Sun Oct 28, 2007 4:50 pm    Post subject: Reply with quote

Before I posted here, I tried it with
Code:
target="_blank"
but that didn't work.

Since I couldn't make it work, I decided to use an image with their link code attached instead of the script and the
Code:
target="_blank"
works just fine that way.

Thanks for responding!

Diane
Back to top View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Affiliate Marketing Forum Index -> Do-It-Your-Selfers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum





Your host: Allan Gardyne.
Earning a good living from affiliate programs since 1998.