CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2008
    Posts
    1

    onLoad form post data - javascript & html

    Hello,
    I have a semi-confusing dilemma. I am trying to pass variables through using url encoding and post form data automatically without the user clicking "Submit"
    Essentially the data will almost always be the same, but the information in the database that it will get its information from will change.

    I have body onLoad="getSearch();"
    with the getSearch function in the code below of course
    and I'm trying to just pass ?PropertyType_chk=1 through the url
    the idea being it searches automatically using property type 1, no need to hit the search button.. but its not working!

    Any help or ideas much appreciated.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: onLoad form post data - javascript & html

    This is known as AJAX. Asynchronous JavaScript and XML give the user the ability to send information back to the server without any need to load or reload pages.

    Here are a couple examples of AJAX to help you along your way. I would suggest tying them with the onchange event. That way, every time an input changes, then you can send the updated information.

    W3Schools AJAX
    My example - populate textbox with AJAX
    My AJAX object
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

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

Featured