Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Unanswered: help me in getting a value from textbox before submiting the form

    i used javascript function to get the value but how will i receive the value in the asp. txtto is the name of the textbox
    <script>
    function disp()
    {
    a= document.form1.txtto.value;
    alert(a);
    return a ;
    }
    </script>

    <%
    <a href= "email_1.asp?id=<%=response.write(value)%> " onClick="disp();">
    %>

    but how will i receive the value returned from disp function
    Last edited by shaluajit; 01-14-05 at 05:25.

  2. #2
    Join Date
    Aug 2004
    Location
    USA
    Posts
    54
    you are trying to pass variable data between server and client codes.

    one way to do this is to use an HTML <Input type="hidden"> text box as an intermediate holding place and refer to your data by using this text box's value in either the client or server codes.

  3. #3
    Join Date
    Feb 2003
    Location
    @ home
    Posts
    163
    You may also use session variables, that are more safe to store the variable value.

    Paulo

  4. #4
    Join Date
    Dec 2003
    Posts
    454
    In your case, I think it is better to use the form instead of the link. When the form is submited, you still can pop up an ALERT window to the user.

Posting Permissions

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