Reply

Thread: JAVASCRIPT GURU NEEDED!!!

 
Tools
  #1  
Old April 15th, 2003, 02:16 PM
Drewbert Drewbert is offline
Drewbert's Avatar
Tree Hugging Liberal Hippy Realist
Join Date: January 18th, 2005
Posts: 2,970
OK. I posted this in another thread a few days ago, but didn't get any reaction. Can a javascript guru take a look at this and see if (s)he can get this baby purring???

*******

In the header, I've put:

function nocj() {
document.images.nocjroute = new Image();
document.images.nocjroute.src ="http://example.com/images/nocj.gif";
}
// End -->
</script>

In one of the qksrv.net img tags on the page, I've added:

onError="nocj()"

So theoretically, if their browser can't contact qksrv.net, the javascript error routine is called, and the browser attempts to load the 'nocj.gif" image from my webserver, and I get a log entry recording that someone can't reach qksrv.net


I've tested it, and the error code, is called, but I can't get the image request to appear in my log file.

It's probably a simple error. Any suggestions?

If we can get this to work, we can get some fairly reliable stats about just how many surfers out there have a poisoned hosts file that is blocking affiliate networks.

If you know a javascript guru that can help, please send them to this thread!!!

Jimmy James fan club membership # 3312
  #2  
Old April 15th, 2003, 04:18 PM
Doc Sawyer Doc Sawyer is offline
Doc Sawyer's Avatar
ABW Ambassador
Join Date: January 18th, 2005
Location: Southern California Desert
Posts: 568
>It's probably a simple error. Any suggestions?

Looks like a complete infuctuation to me....

>In the header, I've put:

function nocj()
{
document.images.nocjroute = new Image();


!You didn't declare variable Image and you do nothing with it

document.images.nocjroute.src ="http://example.com/images/nocj.gif";

!See above...
}
// End -->
</script>

In one of the qksrv.net img tags on the page, I've added:

onError="nocj()"

So theoretically, if their browser can't contact qksrv.net, the javascript error routine is called, and the browser attempts to load the 'nocj.gif" image from my webserver, and I get a log entry recording that someone can't reach qksrv.net


I've tested it, and the error code, is called, but I can't get the image request to appear in my log file.

"Half this game is ninety percent mental." -- Phillies Manager, Danny Ozark
  #3  
Old April 15th, 2003, 04:36 PM
Drewbert Drewbert is offline
Drewbert's Avatar
Tree Hugging Liberal Hippy Realist
Join Date: January 18th, 2005
Posts: 2,970
Thanks for that.

Now, can you posts a corrected version of the script?

Jimmy James Inc. fan club membership # 3312
Join ABW to remove this sponsored message.
  #4  
Old April 15th, 2003, 05:53 PM
Drewbert Drewbert is offline
Drewbert's Avatar
Tree Hugging Liberal Hippy Realist
Join Date: January 18th, 2005
Posts: 2,970
Would it help if I added "name=nocjroute" to the image tag as well as the onerror() bit?

Jimmy James Inc. fan club membership # 3312
  #5  
Old April 15th, 2003, 06:35 PM
Drewbert Drewbert is offline
Drewbert's Avatar
Tree Hugging Liberal Hippy Realist
Join Date: January 18th, 2005
Posts: 2,970
Well, what do you know?

I've been testing it in Netscape 7 all this time and could never get it to work.

Tried it in IE5.2/Mac and it appears to work fine.

I've set it up on a site, and it's reliably telling me when a surfer using IE cannot load qksrv.net images.

This should tell us - in general - that they have a poisoned hosts file that is blocking qksrv.net.

I'll let it run for 24 hours and then we'll see what the results are.

In the few minutes I've had it running, it's already detected 3 surfers that couldn't access Commission Junction.

Jimmy James Inc. fan club membership # 3312
  #6  
Old May 7th, 2003, 08:50 AM
NROforum NROforum is offline
NROforum's Avatar
Newbie
Join Date: January 18th, 2005
Posts: 11
Wow!
Nice work, Drewbert! This is exactly what I was hoping someone could figure out. Powerful stuff.
The other suggestion made in that thread earlier, to call an advisory page providing instructions for restoration of an unaltered hosts file would be the next step.
I know Andrew Clover's parasite advisory page has been invaluable to me.
Big Thanks to all who have worked on this one!

It would be great if someone could post the complete script as we have it now. Just for us newbies to javascript.
Join ABW to remove this sponsored message.
Reply

Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript to detect parasiteware gamemint Blocking Tips/Advice/scripts 37 May 8th, 2005 03:26 PM
Merchant overwriting cookie? (JS guru needed) Rhea Midnight Cafe' 4 June 13th, 2004 10:01 PM
Can javascript and or session cookies cause host problems happypoon Programming / Datafeeds / Tools 3 August 25th, 2002 04:57 PM
Hiding Javascript from search engines happypoon Search Engine Insight 15 August 22nd, 2002 06:14 PM