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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ajax.updater / request...? help needed.

    Hi can someone assist me with getting the output from csearch.php to load into the chub div id. when submited the post value for 'user' will be process by csearch.php. after that i need the output to load into the div.

    Code:
    <script type="text/javascript" src="/js/prototype-1.6.0.3.js"></script>
    	<form method=post enctype="multipart/form-data" name="clookup" id="form" action="hub/csearch.php">
    	<input id="user" name="user" size="20" type="text">
    	<input type="submit" name="submit" value="submit" />
    	</form>
    
    	<!-- results -->
    <div id="chub"></div>		
    	<!--/results -->

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Have you tied any tutorial on Ajax?

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    http://prototypejs.org/api/ajax

    Code:
    new Ajax.Updater('chub', 'hub/csearch.php', {   
    method: 'post', parameters:  $('form').serialize() 
    });
    make your form call something like the above....


  •  

    Posting Permissions

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