[thelist] Mixing Javascript with VB

Peter Barrett Peter.Barrett at corel.com
Wed Jan 8 16:03:01 CST 2003


Yep, the redirect is likely the most expedient. Image src changes will
also work, as well as the use of iFrames/hidden frames to launch
requests from. If you're developing by any chance for an IE only
intranet, the a quick clean way would be to use an ActiveX call like:

        var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        xmlhttp.open('POST', srvLoc , false);
        xmlhttp.setRequestHeader ("Man", "POST" + " " + srvLoc + "
HTTP/1.1");
        xmlhttp.setRequestHeader ("MessageType", "CALL");
        xmlhttp.setRequestHeader ("Content-Type", "text/xml");
        xmlhttp.send( pageHit );

Which assumes theres a page waiting for a post with the contents of
pageHit waiting for a call. If you want more info on the image src
variety or hidden frames, the nice guys at www.javascript-games.org have
some of the most advanced js communication methods I've seen on the web.
It's a bit buried in their tutorial.

I expect most of those ways are overkill for what you're trying to do, &
of interest only if you're looking for something kind of neat to geek
out on... otherwise, go with the redirect ;).

hth,
~pete

-----Original Message-----
From: Seth Fitzsimmons [mailto:seth at note.amherst.edu]
Sent: Wednesday, January 08, 2003 4:36 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Mixing Javascript with VB


> back to the drawing board :-(

Sorry to disappoint.  Here are a couple ideas to make up for it:
1) Have the link pass through a link tracker
(yoursite.com/track?d=newsite.com) that does an HTTP redirect - I think
this was your alternate idea
2) Have the onclick event create an image object (hidden, like
non-initial states for a rollover) and populate it by requesting a
tracking page (as above, but returning an image instead).

I'm not entirely sure what the behavior will be with #2, but I'm fairly
confident that the request will at least occur (allowing you to track
it) before the request for the destination link.  You're essentially
making 2 requests in place of one.

Good luck.
seth

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list