using jquery to access server-side variable from the client-side code?
Hello,
I am trying to access the article_id (which changes when clicked) inside the div called test... I have pasted in my entire code, please take a look:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script>
function doSomething(article)
{
return article;
}
</script>
</head>
<body>
<div id="home">
<%
strSQL = "SELECT * FROM Article"
set rsHeadline = server.CreateObject("ADODB.Recordset")
rsHeadline.Open strSQL, objConn, 1
%>
<table width="100%" border="0" cellspacing="0">
<%iOrder = 1
Do Until rsHeadline.EOF%>
<tr>
<td>
<a href="#test" onClick="doSomething("<%=rsHeadline("article_id")%>")">try here...</a>
</td>
</tr>
<%rsHeadline.MoveNext
iOrder = iOrder + 1
Loop
rsHeadline.Close
set rsHeadline = nothing%>
</table>
</div>
<div id="test">
<%articleid=request.querystring("article_id")%>
<% Response.Write article_id %>
The article id is article_id
</div>
</body>
</html>
any help is much appreciated, thank you!