ajax problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • K.

    ajax problem

    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=\"".$licz nikk."\" name=\"il_poz_j uz_wygener\"
    id=\"il_poz_juz _wygener\">
    <input type=\"text\" value=\"".$licz nikk."\"
    name=\"il_poz_j uz_wygener_post \" id=\"il_poz_juz _wygener_post\" >
    <textarea name=\"utwory_w ypadniete\" id=\"utwory_wyp adniete\" cols=\"60\"
    rows=\"4\"></textarea>
    </td></tr>";
    $xml.="</table>";

    echo $xml;

    ?>
    <form name="form_nowe _notowanie" action="" method="post"
    id="form_nowe_n otowanie">
    <table style="text-align:left;" cellpadding="0" cellspacing="0"
    class="tabelka" >
    <tr>
    <td colspan="4">
    <div id="div_lp_list a">
    <input type="text" value="<?=$licz ; ?>" name="il_poz_ju z_wygener"
    id="il_poz_juz_ wygener">
    </div>
    </td>
    </tr>
    </table>
    </form>

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

    After posting the form

    echo $_POST["il_poz_juz_wyg ener_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


  • shimmyshack

    #2
    Re: ajax problem

    On Apr 24, 9:55 am, "K." <halinaciern... @poczta.onet.pl wrote:
    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=\"".$licz nikk."\" name=\"il_poz_j uz_wygener\"
    id=\"il_poz_juz _wygener\">
    <input type=\"text\" value=\"".$licz nikk."\"
    name=\"il_poz_j uz_wygener_post \" id=\"il_poz_juz _wygener_post\" >
    <textarea name=\"utwory_w ypadniete\" id=\"utwory_wyp adniete\" cols=\"60\"
    rows=\"4\"></textarea>
    </td></tr>";
    $xml.="</table>";
    >
    echo $xml;
    >
    ?>
    <form name="form_nowe _notowanie" action="" method="post"
    id="form_nowe_n otowanie">
    <table style="text-align:left;" cellpadding="0" cellspacing="0"
    class="tabelka" >
    <tr>
    <td colspan="4">
    <div id="div_lp_list a">
    <input type="text" value="<?=$licz ; ?>" name="il_poz_ju z_wygener"
    id="il_poz_juz_ wygener">
    </div>
    </td>
    </tr>
    </table>
    </form>
    >
    Div with id="div_lp_list a" is the div which is replaced by ajax event.
    >
    After posting the form
    >
    echo $_POST["il_poz_juz_wyg ener_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.javas cript, 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.

    Comment

    • MZ

      #3
      Re: ajax problem

      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


      Comment

      Working...