call OnSuccess JavaScript funcation in FireFox Aftar webService

Last post 02-28-2008 1:27 PM by MoahmedAntar. 2 replies.

Sort Posts:

  • Confused [*-)] call OnSuccess JavaScript funcation in FireFox Aftar webService

    02-27-2008, 5:53 PM

    Hi all i have a simple code that work fine in IE but dont work with FF the  OnSuccess Funcation Dont Get Called

    i tryed to search Every Where i hope u can help me thnx .

     

     

    1    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DataSet_.aspx.cs" Inherits="DataSet_" %>
    2    
    3    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    4    
    5    <html xmlns="http://www.w3.org/1999/xhtml">
    6    <head runat="server">
    7    <script type="text/javascript" language="javascript">
    8        function GetDataSet()
    9        {
    10           Phones.GetAllPhones(OnSuccess);
    11       }
    12       function OnSuccess(result)
    13       {
    14       alert("okok");
    15           var SP = new Sys.StringBuilder();
    16           SP.append("<table Border='1'>");
    17           for ( var i = 0 ; i < result.length ; i++)
    18           {
    19               var Phone = result[i];
    20               SP.append("<tr>");
    21               SP.append("<td>"+ Phone.Name_Id+"</td>");
    22               SP.append("<td>"+Phone.Name+"</td>");
    23               SP.append("<td>"+Phone.Phone+"</td>");
    24               SP.append("</tr>");
    25           }
    26           SP.append("</table>");
    27           var Div_ = $get("Contaner");
    28           Div_.innerHTML = SP.toString();
    29       }
    30   </script>
    31       <title></title>
    32   </head>
    33   <body>
    34       <form id="form1" runat="server">
    35       <asp:ScriptManager ID="ScriptManager1" runat="server">
    36       <Services >
    37           <asp:ServiceReference Path="Phones.asmx" />
    38       </Services>
    39       </asp:ScriptManager>
    40       <input type="button" onclick="GetDataSet()"  value="Get_DataSet" />
    41       <div id="Contaner">
    42       
    43       </div>
    44       </form>
    45   </body>
    46   </html>
    47   
    
     
  • Re: call OnSuccess JavaScript funcation in FireFox Aftar webService

    02-27-2008, 9:14 PM
    Answer
    • Loading...
    • kirchi
    • Joined on 03-07-2007, 7:47 AM
    • Posts 328

    Hi MoahmedAntar,

    Strange problem indeed, try to clear cache in the browser. 

    This code should work in FF for sure. There is no error in the code.

    Can you try to test in FF from someone else's computer? Also which version do you use.

     Can you provide webservice code ?

    Hope this helps

     

    My blog: http://blog.devarchive.net
    My samples: http://devarchive.net
  • Re: call OnSuccess JavaScript funcation in FireFox Aftar webService

    02-28-2008, 1:27 PM

    thnx kirchi  yes its work in ather pc o0 i dont know whats up with with my pc but good the bug is not in my cood Party!!!

    thnx alot

Page 1 of 1 (3 items)