Results 1 to 5 of 5

Thread: Javascript and ASP

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Question

    Hi,
    I have a JavaScript Function that returns a numeric value.
    How can I take that value and then use it with my ASP or VBScript Code.
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    I would use a hidden input box on a form. After submitting the form, ASP can read the value of the form variable and work with it as required

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Question How would you set the hidden value

    How would you set the hidden value
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    here is a quick page I put together:

    Code:
    <HTML>
    <SCRIPT language=Javascript>
    
    function SubmitIt()
    {
        // set the value
        document.frmMain.txtJSResult.value = "HELLO WORLD!";
    
        // display that the value is set
        window.alert(document.frmMain.txtJSResult.value);
    
        //  submit the form
        document.frmMain.submit();
    }
    
    </SCRIPT>
    <BODY>
    
    <form name=frmMain method=post>
    <input name=txtJSResult type=hidden>
    </form>
    
    <Input type=Button name=cmdSubmit value=SUBMIT onclick="SubmitIt();">
    
    </BODY>
    </HTML>

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Thanks

    Thanks
    Omar
    [email protected]
    http://omar.caribwalk.com
    To God Be The Glory

    I see Tech People ...

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