PDA

View Full Version : ajax.updater / request...? help needed.


devGOD
06-09-2009, 10:48 PM
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.


<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 -->

A1ien51
06-10-2009, 01:33 AM
Have you tied any tutorial on Ajax?

Eric

ohgod
06-10-2009, 02:35 PM
http://prototypejs.org/api/ajax

new Ajax.Updater('chub', 'hub/csearch.php', {
method: 'post', parameters: $('form').serialize()
});

make your form call something like the above....