Someone help with this please, .modal dialog in a page loaded through .load
This is my main page:
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="newpage.aspx.cs" Inherits="newpage" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function () {
- $("#nrd").click(function () {
- $('#result').load("test.aspx");
- });
- $("#nrd2").click(function () {
- $('#result').load("saveoup.aspx");
- });
- });
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div id="header">
- <div id="butts">
- <input type="button" id="nrd" value="New Record"/>
- <input type="button" id="nrd2" value="Save"/>
- </div>
-
- <div id="usrlogged"><asp:Label ID="lblusr" runat="server" Text="USER:"></asp:Label></div>
-
- </div>
- <div id="content">
-
- <div id="result"> </div>
- </div>
- <div id="footer">
- <p>Copyright ©</p>
- </div>
- </form>
- </body>
- </html>
And this is the page which is loaded into the main page.
What is wrong in my code?
I found the following error:
- Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' jquery-1.8.3.js:477
-
-
-
-
-
-
-
-
j.handle.o