Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get querystring value from onMouseOver

    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

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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

    Code:
    <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
    %>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •