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
    Regular Coder
    Join Date
    Jul 2002
    Location
    The Netherlands
    Posts
    252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post variables with javascript

    Hi,

    I was wondering whether it is possible to post variables using javascript.

    Let me explain: I've got a form and when the form is submitted a javascript function is called. This function reads the values and modifies them. Currently the modified values are being being submitted by the javascript using the get-method (a string with the variables is constructed).

    What I now would like to do is submit the values with javascript using the post-method. Is this possible and how do I do that?

    Thanx, Michiel

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, first of all, JavaScript doesn't submit anything. HTML and HTTP do it.

    So, if your form is method POST, and you populate form elements with the data you want before submitting it (probably use hidden elements), then it will be sent.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

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