Switch from the 'ajax' method to the 'iframe' method. Any errors at that point should be much more apparent - if you get a 404, you'll see it - if the remote page wants you to login again, you'll see that, and the ordinary links in the DHTML window, once you do load a page into it, will load into that window.
Don't do any of the following, it's just a detailed explanation of why the AJAX method is messing up.
On the second page, the path highlighted below is/could be wrong:
Code:
function openmypage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "/mod/", "myOfficeDock - Socialize", "width=1000px,height=500px,left=300px,top=100px,resize=1,scrolling=1")
ajaxwin.onclose=function(){ //Run custom code when window is about to be closed
return window.confirm("Close this window?")
}
}
I imagine that others are as well. It points to:
exapto.com/mod/
which is a 404 not found. If you put it like:
Code:
function openmypage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "mod/", "myOfficeDock - Socialize", "width=1000px,height=500px,left=300px,top=100px,resize=1,scrolling=1")
ajaxwin.onclose=function(){ //Run custom code when window is about to be closed
return window.confirm("Close this window?")
}
}
without the preceding slash, it would point to:
exapto.com/dev/mod/
which appears to be there. So it may load, except it may be prompting for a password. On an AJAX request, you will not see that and will not be able to respond to it.
But you're using the network path, and so it makes a difference as to whether or not www. was used on the dev page, to get to it in the first place. If it was, and this is why I said earlier 'could be', then /mod/ would point to:
www.exapto.com/mod/
which does load, but prompts for a password, something you will not see or be able to respond to with an AJAX request.
But the links on that page are just ordinary links, examples:
Code:
<ul class="ow_main_menu clearfix">
<li class="base_main_menu_index active"><a href="http://dev.exapto.com/mod/index"><span>Main</span></a></li><li class="base_base_join_menu_item"><a href="http://dev.exapto.com/mod/join"><span>Join</span></a></li><li class="base_users_main_menu_item"><a href="http://dev.exapto.com/mod/users"><span>Members</span></a></li></ul>
So, once that content is imported - you chose import via AJAX, it becomes a part of the 'top' page. So of course, clicking on an ordinary link on the page will switch the window.
You could work it out so that the links on /dev/mod/ or whatever page it actually is would load into the AJAX window by making, let's take the first one for example:
Code:
<a href="http://dev.exapto.com/mod/index" onclick="ajaxwin.load('ajax', this.href, 'myOfficeDock - Socialize'); return false;"><span>Main</span></a>
But then, if the page with that link on it were loaded on its own, there would be an error and nothing would happen.
Bookmarks