Click here to Skip to main content
15,895,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I did build some code for web site, but I didn't solute how to include second ajax file without error.
look at the source and please let me know.
source:
XML
a1.aspx----------------------------------------------
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>non title</title>
</head>
<script type="text/javascript">
      function Button1_onclick() {
          var wr = new Sys.Net.WebRequest();
          wr.set_url("a2.aspx");
          wr.add_completed(wr_Completed1);
          wr.invoke()
      }
      function wr_Completed1(results, eventArgs) {
          var result1 = results.get_responseData();
          alert(result1);
          $get("eee").innerHTML = result1;
      }
</script>

<body>
   <form id="form1" runat="server">
   <asp:ScriptManager ID="ScriptManager1" runat="server">
       </asp:ScriptManager>
   <div>

       <div id="eee">
       </div>
       <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
       </div>
   </form>
</body>
</html>

a2.aspx----------------------------------------------

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   <title>non title</title>
</head>
<body>
   <form id="form1" runat="server">
   <div>
   WOW
   </div>
   </form>
</body>
</html>
Posted
Updated 2-Jun-11 19:09pm
v2
Comments
[no name] 13-Jun-11 9:00am    
I've tried your code and it works fine. What error(s) do you see?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900