Results 1 to 7 of 7

Thread: form problem using POST with AJAX

  1. #1
    Join Date
    Apr 2008
    Posts
    58
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default form problem using POST with AJAX

    Hello,

    Here is the situation :

    I have a simple web page using css.
    in a DIV i created a simple form (user and passwd) using POST method.

    the form post line looks as follow,
    Code:
    <form method="POST" action="javascript:ajax_loadContent('divContainer','treatment.php');">
    The action taken is then to load the result of a php page in the same DIV using AJAX (ajax-dynamic-content.js).

    the problem :
    The php script did not recieve any posted variable from the main page.
    the following gives nothing : $passwd=(trim($_POST['passwd']));
    variable is empty.


    Any idea is welcome ^^;

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Show us the element having name of passwd. How is it laid on your form?
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. The Following User Says Thank You to rangana For This Useful Post:

    sfchun (10-31-2008)

  4. #3
    Join Date
    Apr 2008
    Posts
    58
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    thanks for answering , it looks like this :
    Code:
    ...
    Enter your password : <input type="password" size="8" maxlength="8" name="passwd" value="" /> (8 caracteres maximum)
    <input type="submit" value="Go" />

  5. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Could you provide a link to where you got the script from DD.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  6. The Following User Says Thank You to rangana For This Useful Post:

    sfchun (11-01-2008)

  7. #5
    Join Date
    Apr 2008
    Posts
    58
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    K there is a long time i have this js code, and i doubt finaly to have found it on Dynamic Drive ... the one from Dynamic is a diferent...

    anyway here is a direct link the the js file i'm using : Ajax dynamic content

  8. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    The script you've shown shows error on sack() object.

    Alternatively, you might find DD's script useful:
    http://dynamicdrive.com/dynamicindex17/index.html
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. The Following User Says Thank You to rangana For This Useful Post:

    sfchun (11-03-2008)

  10. #7
    Join Date
    Dec 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Tried the same sorth of thing here:

    http://www.dynamicdrive.com/forums/s...047#post173047

    Seems no one has a solution?

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
  •