...

View Full Version : Get querystring value from onMouseOver



Theo1990
02-24-2007, 01:05 PM
Hello,

I'm useing the following code in a databse loop.

<a href="?" onMouseOut="HideV()" onMouseOver="ShowV()" onMouseMove="ShowV()">ID</a>

I need to get the querystring value without a mouse click..

How is this done..

Thanks in advance.

Theo

miranda
02-26-2007, 02:53 PM
Not sure that I understand what your question is. Are you asking how you display the value for each line that will be displayed from your loop?

If that is what you are asking pass the value derived from the ASP code into the javascript onMouseOver function, then merely add code into your javascript function to display this.

example


<script type="text/javascript">
function ShowV(theValue){
// display the value passed to the function like so
// alert(theValue);
}
</script>
<%
Set oRs = Server.CreateObject("ADODB.Recordset")
myConnString = "Put_Your_DSN_Or_DSNLess_Connection_String_Here"
sSQL = "SELECT foobar FROM MyDB"
oRs.Open sSQL,myConnString,1,2
Do While Not oRs.EOF
%>
<a href="?" onMouseOut="HideV()" onMouseOver="ShowV('<%=oRs("foobar")%>')" onMouseMove="ShowV()">ID</a>

<%
oRs.MoveNext
Loop
%>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum