|
View previous topic
::
View next topic
|
| Author |
Message |
DiTryin
Joined: 28 Sep 2007
Posts: 2
|
Posted: Fri Sep 28, 2007 7:14 pm
Post subject: Need help getting banner to open new window
|
|
|
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 |
|
 |
Scarecrow
Joined: 25 Oct 2007
Posts: 1
|
Posted: Thu Oct 25, 2007 8:49 pm
Post subject: Re: Need help getting banner to open new window
|
|
|
| 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 |
|
 |
DiTryin
Joined: 28 Sep 2007
Posts: 2
|
Posted: Sun Oct 28, 2007 4:50 pm
Post subject:
|
|
|
Before I posted here, I tried it with 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 works just fine that way.
Thanks for responding!
Diane |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|