Referal fix

a complete banner management system, any number of banners can be added
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Workaround?

Postby corny on Thu 08. Jul, 2004 16:50

Hi,

As said in this topic, the redirect is not working for all browsers. Maybe the following code is a workaround (I don't know about the referer).

redirect.tpl
Code: Select all
<BODY><CENTER>{MESSAGE}</CENTER>
<SCRIPT LANGUAGE="java**script">
function clickElement (element) {
   if (element.click)
     element.click();
   else if (element.dispatchEvent) {
     var evt = document.createEvent('MouseEvents');
     evt.initMouseEvent(
       'click',
        true,
        true,
        window,
        1,
        0,
        0,
        0,
        0,
        false,
        false,
        false,
        false,
        0,
        null
     );
     element.dispatchEvent(evt);
   }
}

if (document.all)
   setTimeout("document.all['jumplink'].click();",100);
else {
   clickElement(document.links[0]);

}
</SCRIPT>
</BODY>
Last edited by corny on Tue 22. Feb, 2005 12:00, edited 1 time in total.
Regards,
Cornelis
corny
Poster
Poster
 
Posts: 20
Joined: Tue 29. Jun, 2004 14:53

Re: Workaround?

Postby MJ on Thu 05. Aug, 2004 07:37

Niels, using the code with current version I am getting JS errors
Line 1
Char 1
'document.all.jumplink' is null or not an object
Code:0
URL: http://yourdomain.com/redirect.php?bann ... ah..blah...


With this code from corny, no error, but no automatic re-direct either :cry:
corny wrote:
Code: Select all
<BODY><CENTER>{MESSAGE}</CENTER>
<SCRIPT LANGUAGE="java**script">
function clickElement (element) {
   if (element.click)
     element.click();
   else if (element.dispatchEvent) {
     var evt = document.createEvent('MouseEvents');
     evt.initMouseEvent(
       'click',
        true,
        true,
        window,
        1,
        0,
        0,
        0,
        0,
        false,
        false,
        false,
        false,
        0,
        null
     );
     element.dispatchEvent(evt);
   }
}

if (document.all)
   setTimeout("document.all['jumplink'].click();",100);
else {
   clickElement(document.links[0]);

}
</SCRIPT>
</BODY>
MJ
Poster
Poster
 
Posts: 90
Joined: Fri 19. Apr, 2002 13:46

Postby corny on Thu 05. Aug, 2004 08:43

Hmm, what browser are you using? Redirect works fine for me using Firefox 0.9.2 and IE 6.0.
Last edited by corny on Tue 22. Feb, 2005 12:01, edited 1 time in total.
Regards,
Cornelis
corny
Poster
Poster
 
Posts: 20
Joined: Tue 29. Jun, 2004 14:53

Postby MJ on Thu 05. Aug, 2004 14:11

same, IE 6 and Firefox 0.92, neither tpl code is working :? :?
MJ
Poster
Poster
 
Posts: 90
Joined: Fri 19. Apr, 2002 13:46

Postby Jeremy Toaster on Sat 20. Nov, 2004 19:47

I just upgraded to FireFox 1.0 and changing the code to this in the redirects.tpl file

<HEAD><META http-equiv="refresh" content="0;url={REDIRECT_URL}"></HEAD>
<BODY><CENTER>{MESSAGE}</CENTER>
<SCRIPT LANGUAGE="java**script">
setTimeout("document.all['jumplink'].click();",100);
</SCRIPT>
</BODY>

Makes the redirects work perfectly!!!!

The redirects worked fine before in IE 6 and now continue to work properly.

Thanks a lot

http://www.toasters.org/forum

Go there to check the banners at the bottom of the page.
You much also remember that the redirect only works on IMAGE and TEXT links not HTML or FLASH (that I know of).
Jeremy Toaster
Poster
Poster
 
Posts: 5
Joined: Sat 20. Nov, 2004 19:42

Postby omi on Mon 04. Apr, 2005 11:59

nothing is working for me and I have the very newest version. any suggestions? I tried almost every so called fix on these forums :(

weird thing is , it looks like it's parsing right - the source is fine WHOA!
why can't i click it?

http://www.bighustle.com/brix-central/

Try it! It's weird!

How do I do custom code when this doesn't even work. I tried some custom code - nada.

could someone advise?
omi
Poster
Poster
 
Posts: 10
Joined: Fri 01. Apr, 2005 11:52

Previous

Return to Complete banner [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 2 guests

cron