469,271 Members | 1,533 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

AJAX problem?

Hello,

I seem to have forgotten how to get the send.php file to receive the
values from the form using Form.serialize() - can anyone please put me
right!

Cheers

Geoff
<script type="text/javascript">
function send(){
var params = Form.serialize($(emailForm));
new Ajax.Updater('updateDiv', 'send.php', {asynchronous:true,
parameters:params});
}

</script>
</head>

<body>

<H2>Group 1</H2>
<form id="emailForm">
<input type="hidden" name="group" value="1">
Please enter your email address: <input type="text"
name="email_address">
<input name="sendbutton" type="button" value="Send" onClick="send();">
</form>

<div id="updateDiv"></div>
send.php file - no results for the $result1 and $result2 ...

<?php
$result1 = $_GET['group'];
$result2 = $_GET['email_address'];

echo "Hello ...";
echo $result1;
echo $result2;

Mar 22 '08 #1
1 1160
On Sat, 22 Mar 2008 10:25:47 +0000, Geoff Cox <gc**@freeuk.notcom>
wrote:
>Hello,

I seem to have forgotten how to get the send.php file to receive the
values from the form using Form.serialize() - can anyone please put me
right!
my own silly mistake - I should have used $_POST ...!

Geoff
Mar 22 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by bobzimuta | last post: by
31 posts views Thread by Tony | last post: by
5 posts views Thread by Martin | last post: by
3 posts views Thread by Alok yadav | last post: by
6 posts views Thread by =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post: by
3 posts views Thread by willl69 | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.