PDA

View Full Version : make this affiliate Onclick code work in I.Explorer?



learningstuff
04-14-2012, 03:17 AM
Hi how are you, I thought I had a code that done exactly what I want, which it does , but only in fire fox.

It doesn't work in I.E explorer, the following code does what I want which is be able to display a dot com name down the bottom left (when I hover over it)
Also when I click on it open a new window and goes straight to affilite link, and also make the title work when hover over it.

It works great in firefox but in ie it wants to simply go straight to the first
[Broken Link Removed]

It completly ignores my onclick code?


<A

HREF="http://www.thenametodisplyinbottompage.com" ONCLICK=" var bobsmilk=window.open ('','_blank');bobsmilk.location='bobsmilkaffiliatelink';
return event.returnValue=false;" title="bobs milk">"<IMG SRC="image" BORDER="0" HEIGHT="173" WIDTH="173" ALT="bobs milk"></A>


Much help appreciated cheers

jscheuer1
04-14-2012, 04:06 AM
It's hard to say without seeing the actual page. But the first thing I would try is changing:



return event.returnValue=false;

to:


return false;

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

learningstuff
04-14-2012, 05:44 AM
I thank you heaps for your quick reply,

I will pm you link to my site

cheers

learningstuff
04-14-2012, 05:51 AM
Oh okay you can't pm on this forum
It's a gambling related site is it okay to post my site, this is from the code.

and changing that false didn't work. as I said it works fine in fire fox just internet explorer it would go to try to go to aladdins2234.com where as in firefox it does the right thing keeps my mine site open and goes to my affiliate link.

<A

HREF="http://www.anysitehere.com" ONCLICK=" var bobsmilk=window.open ('','_blank');bobsmilk.location='myaffiliatelink';
return event.returnValue=false;" title="bobsmilk"><IMG SRC="imagecode" BORDER="0" HEIGHT="173" WIDTH="173" ALT="bobsmilk"></A>
</div>


Here is my site [link removed]

Its the affiliate link aladdins casino to the right i am trying to get it working on currently

as you see it works on fire fox

but if you click on aladdins casino in i.e it goes to error page which it shouldn't

cheers

learningstuff
04-14-2012, 06:06 AM
oh Cant pm on this site? I posted the link didn't come up ? as I said it works on firefox just not on i.e

cheers

djr33
04-14-2012, 06:18 AM
Your post got flagged by our automatic spam filter. I've approved it. You can PM after you have 5 posts (almost there), also set up to stop spam.

It might get flagged again because of the word 'casino', which is frequently in spam, but we'll approve it as soon as we see it.

learningstuff
04-14-2012, 06:48 AM
Your post got flagged by our automatic spam filter. I've approved it. You can PM after you have 5 posts (almost there), also set up to stop spam.

It might get flagged again because of the word 'casino', which is frequently in spam, but we'll approve it as soon as we see it.


Okay thanks heaps, yer it is a full on code but it does alot of good stuff, I think because some codes the first link has to be your main page to hold it main link then for new window

this code you can change the first .com to anything, plus title hover over

only thing is it dont work on internet explorer

much help appreciated

cheers
:)

learningstuff
04-14-2012, 07:21 AM
Hi just realised what the problem is, it actually does work, when uploaded.

It;s just dreamweaver's preview, in i.e it doesn't work lol, In the preview mode blocks it when trying to preview in d weaver.

It works, sorry about the hassle ect.

Delete the post if you want

cheers
:)