"All I need now is to figure out the syntax of moving my script over
into a separate .js file instead of being inline."

Hello Mintyman, I'm glad to know that there is still classic asp guys
like me out there :=)

OPTION 1:

On my end I use DYNAMIC .js file to get values from the server...

<script type="text/javascript" src="myFile.js.asp" ></script>

In your myFile.js.asp you have something like this:


<!--#include file="conn.asp" -->

' here you can also connect to DB and create a RecordSet to get fresh
values !


' or simply get the server session variables

$(document).ready(function() {
        $("a.dload").click(function(){
    var CompanyID = <%=session("CompanyID")%>  ;
    var UserID = <%=session("UserID")%> ;
    var DownloadID = <%=session("DownloadID")%>;
$.ajax({
   type: "GET",
   url: "downloadtrack.asp",
   data: "CompanyID=" + CompanyID + "&UserID=" + UserID +
"&DownloadID=" + DownloadID
  });
 });
});


OPTION 2:

To get the user's values, you can do a hidden ajax request to a page
called "getUserValues.asp" and this page give the proper info in
simple text (or xml, jSon) and you take the values from the
"responseText"


Enjoy!

//JF//

Reply via email to