[thelist] Mixing Javascript with VB

Rob Smith rob.smith at THERMON.com
Wed Jan 8 14:55:00 CST 2003


Well, just for S&G I tried it out anyway. It worked.

This is my code exactly (for anyone else with this problem):

<%
set LoggingIt = Server.CreateObject("ADODB.Recordset")
LoggingIt.ActiveConnection = MM_myConnectionDSNInfo_STRING
LoggingIt.CursorType = 0
LoggingIt.CursorLocation = 2
LoggingIt.LockType = 3

Function logit()
   LoggingIt.Source = "INSERT INTO myTable (myColumn) VALUES ('" & now &
"')"
   LoggingIt.Open()
end function

%>
<a href="folder/article.pdf" onclick="<%logit()%>">Article</a>

Thanks anyway,


-----Original Message-----
From: Peter Barrett [mailto:Peter.Barrett at corel.com]
Sent: Wednesday, January 08, 2003 2:38 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] Mixing Javascript with VB


I don't think this will do what you want, as the logit function is run
on the server & the call in the onClick would be on the client. By the
time you get to client side code, you're stuck with using javascript to
call home to ask for something to happen via get or post.

~pete

-----Original Message-----
From: Rob Smith [mailto:rob.smith at THERMON.com]
Sent: Wednesday, January 08, 2003 3:34 PM
To: Thelist (E-mail)
Subject: [thelist] Mixing Javascript with VB


Hi list,

I know I've asked a similar question about this in the past but I wanted
to know if this approach is feasible:

<%
    function logit()
       'open DB connection
	 'report activity
	 'close DB connection
    end function
%>

<a href="link.pdf" onClick="<%logit()%>">Here's a link</a>

The other long way around this is to link to a hidden page that logs,
then redirects to document. I want to avoid that.

Thanks in advance,

Rob.Smith
--
* * 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 !
--
* * 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