SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Qustion for a JavaScript Master.

    This is a link to a script that is perfect for what I'm doing, except it uses a type="get" command and I need it to use method="post".

    http://javascript.internet.com/forms...stname=5&age=5

    Can any one modify this code from <type="get"> to <method="post"> Please?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No. This is a purely Javascript solution. Javascript has no access to forms sent using the POST method.

    You would need to use a server language to handle the POST.

  3. #3
    SitePoint Enthusiast csjc2662's Avatar
    Join Date
    Feb 2007
    Location
    Texas, USA
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What are you trying to do?

    If your trying to do something with the form input values to format them for posting you have to rewrite the whole thing(form and all), but it can be simulated. Just not with that example.
    This has some info http://www.webmonkey.com/webmonkey/9...x3a_page2.html
    Quote Originally Posted by jimfraser View Post
    No. This is a purely Javascript solution. Javascript has no access to forms sent using the POST method.

    You would need to use a server language to handle the POST.
    If your trying to do something with the form input values to format them for posting you have to rewrite the whole thing(form and all), but it can be simulated. Just not with that example.
    I didn't say he could do it, just simulate it, with formating the input of the form after it was entered with the onSubmit(); event. I always found it better learning when trying to find ways around when I learned JavaScript.
    Last edited by csjc2662; Feb 10, 2007 at 14:33. Reason: clarify
    James
    New links coming soon....

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can any one modify this code from <type="get"> to <method="post"> Please?
    Javascript masters charge $200/hr.


Bookmarks

Posting Permissions

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