views:

439

answers:

1

Hello,

I have the following function:

jQuery(document).ready(function($){
  $("div.findButton").click(function(){
   UidID=Math.floor(Math.random()*1000);
   PostCode=$("#postcode").val();
   $.get("result.php", {postcode: PostCode,uid:UidID}, function(response){
    $("#result").html(response);
   });
  });
 });

example content of the jQuery response:

<table cellspacing="0" cellpadding="0" border="0">
 <tbody>
  <tr>
   <td class="left">Address:</td>
   <td class="right"><select class="tselect" name="address">
    <option value="80A Town Street">80A Town Street</option>
    <option value="102 Town Street">102 Town Street</option>
   </select>
   </td>
  </tr>
  <tr>
   <td class="left" />
   <td class="right"><input class="tinput" type="text"
    value="Horsforth" name="address1" />
   </td>
  </tr>
  <tr>
   <td class="left">Town:</td>
   <td class="right"><input class="tinput" type="text"
    value="Leeds" name="town" />
   </td>
  </tr>
  <tr>
   <td class="left">County:</td>
   <td class="right"><input class="tinput" type="text"
    value="West Yorkshire" name="county" />
   </td>
  </tr>
 </tbody>
</table>

everything works fine and it displays the results, but when I hit the submit button, it post the values from the jQuery response fields only in IE8. I try on FF, Opera, Chrome and Safari, but they all not return the values from the jQuery response fields.

Someone having same problem? Or any solution?

Thanks in advance!

+2  A: 

Try to use:

$.post("result.php", {postcode: PostCode,uid:UidID}, function(response){
  $("#result").html(response);
}, "json");
JO