I’m trying to load a .aspx page as a modal window inside another .aspx page. But it seems it does not load the page correctly, i’m using JQuery get() method.
It’s the code to load page and show it:
$(document).ready(function () {
$.get('PagesForMenu.aspx', function (data) {
modal.open({ content: data });
});
});
It’s the host page: http://pastebin.com/r3msLELP
The page I’t trying to load has a CKeditor control and two textboxs and a button that validates controls (using JQuery validate plugin) then submits the form.
When I run PagesForMenu.aspx from the browser it works fine (loads CKeditor and validating works). But when its loaded in modal window, CKeditor is not loaded and when I click the submit button it does not validate form.
Page in the browser:
Loaded page in the modal window:

The page i’m trying to load in modal window: http://pastebin.com/gS0JBBDS
I found out what’s the problem. When you load a page with
get(), it does not run scripts inside the page. you should put all scripts in a file and load it using$.getScript().