dory550 lambert
asked on
Monitoring clicks on HTML links
Hi Guys
Deployment: Website on 2003 server
language classic-ASP/VBS
IIS 6.00
I have the link below to provide customers with price catalog on website
<A href = "misc/Price_Catalog.pdf">C lick here to download a price catalog</A>
I have an email code snippet which sends me email confirmations etc
Is there a way to run the a code snippet only when the link above is clicked?
Thank u
Dory
Deployment: Website on 2003 server
language classic-ASP/VBS
IIS 6.00
I have the link below to provide customers with price catalog on website
<A href = "misc/Price_Catalog.pdf">C
I have an email code snippet which sends me email confirmations etc
Is there a way to run the a code snippet only when the link above is clicked?
Thank u
Dory
ASKER
scratchyboy
Thanks fo your response
I am not sure How to make your solution work for me.
I need to get an email with customer number sent to me
I have in place a vbs/asp sub that does just that each time that web page is visited
But not all visits result in a catalog being downloaded
hence my request for assistance.
Dory
Thanks fo your response
I am not sure How to make your solution work for me.
I need to get an email with customer number sent to me
I have in place a vbs/asp sub that does just that each time that web page is visited
But not all visits result in a catalog being downloaded
hence my request for assistance.
Dory
You would use onclick event in link, and AJAX. Do you know how to use ajax?
http://skeymedia.com/classic-asp-and-ajax-tutorial/
http://skeymedia.com/classic-asp-and-ajax-tutorial/
"I have in place a vbs/asp sub that does just that each time that web page is visited"
Why not have the ASP/VBS script do that when the link is clicked, not when the page is viewed. It makes more sense to do it when the person is interested, not merely curious. Can you not do that?
Why not have the ASP/VBS script do that when the link is clicked, not when the page is viewed. It makes more sense to do it when the person is interested, not merely curious. Can you not do that?
ASKER
Scratchyboy
Maybe I am doing something wrong
VBScript is the default language of my ASP pages
Both codes below did not work
Click here to download a price catalog
Click here to download a price catalog
How do I connect the onclick event to the sub?
Dory
Maybe I am doing something wrong
VBScript is the default language of my ASP pages
Both codes below did not work
Click here to download a price catalog
Click here to download a price catalog
How do I connect the onclick event to the sub?
Dory
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Did you see my post? It is the appropriate way to do this.
ASKER
Hi Guys
I manage to come with a simpler solution
I changed the link to read as follows:
Click here to download a price catalog
Below is the complete code for cat3.asp
<% @ LANGUAGE="vbscript" %>
<%
email1
response.redirect "misc/catalog.pdf"
Sub email1
set objmail=CreateObject("CDO. Message")
objmail.from="catalogs@myw ebsite.com "
objmail.to= "catalogs@mywebsite.com"
objmail.Subject="Catalog DownLoad -- " & session("CustNumber")
objmail.HtmlBody= "Catalog dated 07/01/2008 was downloaded"
objmail.send
set objmail= Nothing
End Sub
respnonse.end
%>
golfdoctor
Tthanks for your intro to AJAX url
scrathcyboy:
Thank you very much for the time and effort you invested in helping me
I would gladly award you the points
But to do that I will have to click on "Accept as Solution" under your solution
I am not sure if that would be acceptable here........
Dory
I manage to come with a simpler solution
I changed the link to read as follows:
Click here to download a price catalog
Below is the complete code for cat3.asp
<% @ LANGUAGE="vbscript" %>
<%
email1
response.redirect "misc/catalog.pdf"
Sub email1
set objmail=CreateObject("CDO.
objmail.from="catalogs@myw
objmail.to= "catalogs@mywebsite.com"
objmail.Subject="Catalog DownLoad -- " & session("CustNumber")
objmail.HtmlBody= "Catalog dated 07/01/2008 was downloaded"
objmail.send
set objmail= Nothing
End Sub
respnonse.end
%>
golfdoctor
Tthanks for your intro to AJAX url
scrathcyboy:
Thank you very much for the time and effort you invested in helping me
I would gladly award you the points
But to do that I will have to click on "Accept as Solution" under your solution
I am not sure if that would be acceptable here........
Dory
I thought you were looking for something a little more robust, and not just for a single file redirect. Accept which ever one helped you, if either.
ASKER
Scratchyboy
I decded to go with one of your solutions
Thank you
Dory
I decded to go with one of your solutions
Thank you
Dory
document.form1.submit();
form1 is the name of the form, and it submits to a server script whatever you want to be emailed to you.
Open in new window