By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

ajax problem

P: n/a
K.
Hi!

I have problem with Firefox. I have such code:
<?
$xml = "<?xml version='1.0' encoding='utf-8' ?>";
$xml.="<table>";

$xml.="<tr><td colspan=\"5\">
<input type=\"hidden\" value=\"".$licznikk."\" name=\"il_poz_juz_wygener\"
id=\"il_poz_juz_wygener\">
<input type=\"text\" value=\"".$licznikk."\"
name=\"il_poz_juz_wygener_post\" id=\"il_poz_juz_wygener_post\">
<textarea name=\"utwory_wypadniete\" id=\"utwory_wypadniete\" cols=\"60\"
rows=\"4\"></textarea>
</td></tr>";
$xml.="</table>";

echo $xml;

?>
<form name="form_nowe_notowanie" action="" method="post"
id="form_nowe_notowanie">
<table style="text-align:left;" cellpadding="0" cellspacing="0"
class="tabelka">
<tr>
<td colspan="4">
<div id="div_lp_lista">
<input type="text" value="<?=$licz; ?>" name="il_poz_juz_wygener"
id="il_poz_juz_wygener">
</div>
</td>
</tr>
</table>
</form>

Div with id="div_lp_lista" is the div which is replaced by ajax event.

After posting the form

echo $_POST["il_poz_juz_wygener_post"]

gives me 30 in Internet explorer 7.0., but on Firefox

gives me null

I don`t know why. I spent 3 hours on it and I cannot find any error.

Could you help me solve this problem?

Thank you in advance
Apr 24 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Apr 24, 9:55 am, "K." <halinaciern...@poczta.onet.plwrote:
Hi!

I have problem with Firefox. I have such code:
<?
$xml = "<?xml version='1.0' encoding='utf-8' ?>";
$xml.="<table>";

$xml.="<tr><td colspan=\"5\">
<input type=\"hidden\" value=\"".$licznikk."\" name=\"il_poz_juz_wygener\"
id=\"il_poz_juz_wygener\">
<input type=\"text\" value=\"".$licznikk."\"
name=\"il_poz_juz_wygener_post\" id=\"il_poz_juz_wygener_post\">
<textarea name=\"utwory_wypadniete\" id=\"utwory_wypadniete\" cols=\"60\"
rows=\"4\"></textarea>
</td></tr>";
$xml.="</table>";

echo $xml;

?>
<form name="form_nowe_notowanie" action="" method="post"
id="form_nowe_notowanie">
<table style="text-align:left;" cellpadding="0" cellspacing="0"
class="tabelka">
<tr>
<td colspan="4">
<div id="div_lp_lista">
<input type="text" value="<?=$licz; ?>" name="il_poz_juz_wygener"
id="il_poz_juz_wygener">
</div>
</td>
</tr>
</table>
</form>

Div with id="div_lp_lista" is the div which is replaced by ajax event.

After posting the form

echo $_POST["il_poz_juz_wygener_post"]

gives me 30 in Internet explorer 7.0., but on Firefox

gives me null

I don`t know why. I spent 3 hours on it and I cannot find any error.

Could you help me solve this problem?

Thank you in advance
post the faulty javascript on the comp.lang.javascript, use a cross
browser ajax library and when you write code make sure its cross
browser js by not using M$ methods that only work with IE.

Apr 24 '07 #2

P: n/a
MZ
I know what it was.

Firstly, I have the error in the code. I have validated it by w3 validator
and I had to change div not to have blank lines before pasting xml code by
ajax because it also generated a problem.

After this all my page is html valid and forms is work well.

I think the main problem was in the <formtag, because I have had it on the
not good place and firefox html interpreter didn`t see the <formtag after
submitting form and all of the form <input>s were empty

Firebug helped me a lot to fix the problem.

Kindest regards
Macin
Apr 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.