SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
May 18, 2010, 07:36 #1
- Join Date
- Oct 2009
- Posts
- 23
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Need help onclick button vbscript in asp classic, updating sql table
This is classic asp so I am not sure what forum this should go in. I have a image that when i click on it I want to update a field in a sql table. I am having trouble getting it to work. I have a vbscript for the onclick on the button and then a sub for the script. I need assistance on what I am missing with the code provided below. Here is the image html source code:
Code:<img src="../images/smallplus.gif" alt="Save All as Omniture" onclick="BLOCKED SCRIPT addOmniture" style="cursor:hand;">
and here is the vbscript code:
Code:sub addOmniture() Set rs = Server.CreateObject("ADODB.Recordset") rs.open strSQL = "Update URL set tiOmniture='1' and iMasterId = " & iMasterId conn.execute strsql end sub sub editURL(URL) window.open "url.asp?mid=<%=iMasterId%>&action=update&URL=" & URL,"URLWin","width=580,height=425,top=250,left=250,resizable=1","true" end sub
-
May 18, 2010, 09:22 #2
- Join Date
- Jun 2007
- Posts
- 691
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you're confusing client side scripting with server side scripting.
ASP runs on the server. "OnClick" is client side scripting.
In order to have ASP process the code it must have the requested action submitted to the server.
We can't teach you ASP programming but you can learn more about it at sites like this
http://www.maconstateit.net/tutorials/ASP/default.htm
Bookmarks