jquery id selector echoed php? not working -


    //play.php echo' <div id="new_char" style="text-align:center; position:relative; top: 100px;"><center>         not have character! <br> make one...<br><br>         <form method="post" >             character name: <input type="text" name="name" size="25"> <br>             class: <select name="class">                 ';                 $classinfo = "select * classes";                 $classinfo2 = mysql_query($classinfo) or die("could not select classes");                  while($classinfo3 = mysql_fetch_array($classinfo2) )                 {                 echo"<option>$classinfo3[type]</option>";                 }                 echo'              </select><br />             <div id="new_char_error"> </div>             <br />             <input id="make_char" type="submit" value="submit">         </form>         <table border="0"  cellspacing="30">             <tr><td  valign="top">                 </td>                 <td valign="top" >                     <b style="text-align:center;">class starting modifiers</b>                     ';                     $selectclass="select * classes";                     $selectclass2=mysql_query($selectclass) or die("couldnt classes");                     echo'                      <table border="1" bordercolor="black" bgcolor="#fffffff">                         <tr><td font color="cc0033"> class </td> <td font color="cc0033"> attack </td> <td font color="cc0033"> defense </td>  <td font color="cc0033"> endurance </td>  </tr> <br>                          ';                          while($selectclass3=mysql_fetch_array($selectclass2)) {                         echo " <tr><td> $selectclass3[type]</td> <td> $selectclass3[attack]</td>  <td> $selectclass3[defense]</td>   <td> $selectclass3[maxendurance]</td> </tr>";                         }                         echo'                     </table>                 </td></tr></table></center> </div> '; <script> $("#make_char").click(function() { $.ajax({ url:'character_scripts/new_char.php', success: function(data) { $('#new_char_error').html(data); } });  }); </script> 

is possible use div echoed through php jquery selector? have form not being submitted when submission clicked. code on new_char.php looks good. ive tested loops , possible variation of codes structure during runtime, can think of jquery can not use selector echoed in php. im not familiar jquery , did not find answer when searching online.

ps: function separate file , not entire files posted, (to conserve space)

if post found, might others who've come here looking answer same problem.

im guessing simple missing semi or typo jquery shouldnt care how tag got selector

thanks!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -