Hi everyone. After wrestling with this one for awhile I've come to
the conclusion that I need your help. For your reference, here are
two pages. They differ only in which version of jQuery they use. The
first uses 1.1, the second uses 1.04.
http://furzle.com/user_functions/register
http://furzle.com/jquery104.html
Don't bother filling in the form; just hit submit. If your browsers
behave like mine, you'll notice version 1.04 updates a div upon
submission, while 1.1 just sits there.
The code in question is this:
<script type="text/javascript">
$(document).ready(function() {
/// Looks for submit form link
$('#submit_form').click(function() {
$("div#create_user_status").load("http://furzle.com/elements/php/
dynamic_forms.php",{first_name:$('#first_name').val(),
last_name:$('#last_name').val(),
email_address:$('#email_address').val(),
gender:$('#gender').val(),
birthday_mon:$('#birthday_mon').val(),
birthday_day:$('#birthday_day').val(),
birthday_yr:$('#birthday_yr').val(),
username:$('#username').val(),
password_one:$('#password_one').val(),
password_two:$('#password_two').val(),
zip:$('#zip').val(),
fields_list:$('#fields_list').val(),
handler:$('#handler').val()
});
});
/// Looks for form submission
$('#new_user_form').submit(function() {
$("div#create_user_status").load("http://furzle.com/elements/php/
dynamic_forms.php",{first_name:$('#first_name').val(),
last_name:$('#last_name').val(),
email_address:$('#email_address').val(),
gender:$('#gender').val(),
birthday_mon:$('#birthday_mon').val(),
birthday_day:$('#birthday_day').val(),
birthday_yr:$('#birthday_yr').val(),
username:$('#username').val(),
password_one:$('#password_one').val(),
password_two:$('#password_two').val(),
zip:$('#zip').val(),
fields_list:$('#fields_list').val(),
handler:$('#handler').val()
});
});
});
</script>
What I'm doing is gathering the values from the form and sending it
to dynamic_forms.php. Whatever dynamic_forms.php returns gets
assigned to div#create_user_status. I'm drawing inspiration from this
code:
$("div#dhtml").load("html.cgi",{name:"John"});
Taken from this page:
http://jquery.com/demo/ajax/
Despite my best efforts, I can't get any of the code above to work in
1.1 (even the very simple name:"John" example). I must be doing
something wrong. Any suggestions? Thanks in advance.
BT
---------------------------------------------
Brian Tobin
e-mail: [EMAIL PROTECTED]
cell: 805-698-6365
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/