I have this form submit code:
Event.observe(window, 'load', init, false);
function init() {
Event.observe('addressForm', 'submit', storeAddress);
}
function storeAddress(e) {
$('response').innerHTML = 'Adding email address...';
var pars = 'address=' + escape($F('address'));
var myAjax = new Ajax.Updater('response', 'ajaxServer.php', {method: 'get', parameters: pars});
Event.stop(e);
}
How can I change it to work with jQuery?
Here is the html form:
<form id="addressForm" action="index.php" method="get"> <b>Email:</b> <input type="text" name="address" id="address" size="25"><br> <input name="Submit" value="Submit" type="submit" /> <p id="response"><?php echo(storeAddress()); ?></p> </form>
and this is php code at start of document:
<?php
require_once("inc/storeAddress.php");
?>