Help with PHP+AJAX

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
redfoman
Forum Newbie
Posts: 1
Joined: Tue Sep 14, 2010 9:02 am

Help with PHP+AJAX

Post by redfoman »

Hello all

I Have a problem with postvars + ajax + firefox (note: no ajax post request)
I have a form which I refresh it via ajax, but when i submit the form, firefox can't read the POST variables (form fields values)
in IE is working just fine

code structure:
----------------------------------------------------------
if ($_POST['SUBMIT_FORM'] == "YES") {
$value_1 = $_POST['value1']; //empty in firefox
$value_2 = $_POST['value2']; //empty in firefox
}

<form name="MyForm">
<div id="RefreshArea">
<input type="text" id="value1" name="value1" />
<input type="text" id="value2" name="value2" />
<input type="submit" value="Submit Form" />
</div>
<input type="hidden" id="SUBMIT_FORM" name="SUBMIT_FORM" value="YES" />
</form>
-------------------------------------------------------------

when i change via ajax the 2 fields in "RefreshArea" block and submit the form, the 2 posted values are empty (using firefox)
i tried to fix the problem by moving the whole form in div tag in order to refresh it via ajax but steal nothing....

Can anyone help please
Thanks in advance
User avatar
bradbury
Forum Commoner
Posts: 40
Joined: Wed Aug 25, 2010 11:21 am
Location: Eugene, OR

Re: Help with PHP+AJAX

Post by bradbury »

I don't see any javascript function being called anywhere. What is the exact goal of this application? Also please place your code between PHP Code tags
Post Reply