I generally do things with vbscript on the server, but I have an issue and the only thing I can think of to handle it is with javascript, but I can't get it to work. So, here is what I am trying accomplish. I have a cookie dictionary that I set no problem with vbscript, but now I have to update one of the values when the user clicks on a hyper link. I have tried this for the link
and this for the function
Both of which seem to fail miserably. First, the link does not pull the value that I want into the onclick event call and my function doesn't seem to actually do anything. Help? Please?
WB
Code:
<% Do until rs.eof
dim conid : conid = rs("contact_id")%>
<li><a href="ministry.asp?conid=<%=conid %>" onclick="setCookie(conid)"><%=rs("name_first") %> <%=rs("name_last") %> <%=rs("position") %> <%=rs("email") %> <%=rs("cell_phone") %> <%=rs("work_phone")%></a> <a href="editcontact.asp?conid=<%=conid %>">edit</a></li>
<%rs.MoveNext
Loop %>
and this for the function
Code:
<script type="text/javascript">
function setCookie(conid){
document.cookie=(("YCMReg")("contact_id")=escape(conid));
}
</script>
Both of which seem to fail miserably. First, the link does not pull the value that I want into the onclick event call and my function doesn't seem to actually do anything. Help? Please?
WB