Advertisement
Guest User

Untitled

a guest
Feb 11th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.         $(document).ready(function () {
  3.             $("#SelectCountry").load( function() {
  4.                 $.ajax({
  5.                     url: "../Member/Home.aspx/GetCountryName",
  6.                     type: "POST",
  7.                     dataType: 'json',
  8.                     contentType: 'application/json; charset=utf-8',
  9.                     data: "{'name': '" + "1" + "'}",
  10.                     async: false,
  11.                     success: function (response) {
  12.                         if (response.d != null) {
  13.                             $.each(response.d, function (i, response) {
  14.                                 debugger;
  15.                                 $("#SelectCountry").append("<option value=" + response.CountryId + ">" + response.CountryName + "</option>");
  16.                             });
  17.                         }
  18.                     },
  19.                     error: function (xhr) {
  20.                     }
  21.                 });
  22.             });
  23.         });
  24.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement