Results 1 to 2 of 2

Thread: How do I do this?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Unhappy

    I'm trying to use a function to grab client side variables but I am very discouraged and ready to admit defeat. The three things that retard me are:

    A. How do I send the request to the function from a dynamicly made hyperlink
    B. How do I get it back
    C. and how do I put these variables into the querystring

    Can anyone help before I request a demotion at work.

    code:

    <HTML><HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function blah()
    {
    var strURL;
    strURL = Tcode.options(Tcode.selectedIndex).innerText;
    strURL2 = pass.value;
    blah = "header.asp?Joe.Tcode=" + strURL + "&" + "Joe.pass=" + strURL2;
    }
    -->
    </SCRIPT></HEAD>


    <BODY>
    <!--Do all the DB Connect stuff here-->
    <%Set QueryD = Connect.Execute (Qstr)%>
    <%Do Until QueryD.EOF%>
    <TR>
    <td><b>
    <a href=<%=QueryD("Stuff")%>?OnClick=(blah)>
    Request for <%=QueryD("Stuff")%></b><br></a>
    <%QueryD.MoveNext%>
    <%loop%>
    </td></TR></Table><P>
    </BODY>
    </HTML>

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Well.. I can't help you on the demotion request decision.. but I think I see what your trying to do:

    Code:
    <HTML>
    <HEAD> 
    <SCRIPT LANGUAGE="JavaScript"> 
    <!-- 
    function blah() 
    { 
    var strURL;
    //I'm assuming the Tcode and pass elements are defined somewhere that you just didn't include...
    strURL = Tcode.options(Tcode.selectedIndex).innerText; 
    strURL = "header.asp?Tcode=" + strURL + "&" + "pass=" + pass.value;
    //Don't use periods in your querystring names- keep it simple
    location.href=strURL
    } 
    --> 
    </SCRIPT>
    </HEAD> 
    <BODY> 
    <!--Do all the DB Connect stuff here--> 
    <%Set QueryD = Connect.Execute (Qstr)%> 
    <TABLE>
    <%Do Until QueryD.EOF%> 
     <TR> 
      <td>
       <b><a href="javascript:blah()">
    Request for <%=QueryD("Stuff")%></a></b><br>
      </td>
     </TR>
     <%QueryD.MoveNext%>
    <%loop%>
    </Table>
    </BODY> 
    </HTML>
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width