hi all...i am hoping someone can point me in the right direction on how to show a message while page is loading...
the problem i have is the page contains multiple frames
main page (frame structure) - checklist_frame.asp
left menu (category) category_frame.asp
what i can't figure out is where (which page and/or frame) i put the javascript code...i have put in the left (category) frame but the js halts loading...
here is the .js
i need the loading message for the fact ...withing these frames i am building serverside scripts that create large recordsets for a javascript tree...this is my initial thought; however, if the loading message...for whatever reason cannot be done in this situation...i will go w/ plan b - ajax (onclick event to open each tree node hits server vs all-at-once)
so, w/ that in mind..
1. is it possible to do what i am asking?
2. how?, if possible
3. where does it go?
i am a total js newbie...i work serverside code and could use some help...it's greatly appreciated
the problem i have is the page contains multiple frames
main page (frame structure) - checklist_frame.asp
Code:
<html>
<head>
<title></title>
</head>
<frameset framespacing="6" rows="40,*">
<frame src="title.html" FRAMEBORDER="no" BORDER="0" BORDERCOLOR="#3366cc" scrolling="no" noresize>
<frameset cols="200,*" border="1" frameborder="1" FRAMESPACING="6" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
<frame style="width:100%;" name="menu" src="category_frame.asp" FRAMEBORDER="no" BORDER="0" BORDERCOLOR="#3366cc" scrolling="auto">
<frame style="overflow-x:hidden;" name="report" rows=",*" src="checklist_form.asp" FRAMEBORDER="no" BORDER="0" BORDERCOLOR="#3366cc" scrolling="auto">
</frameset>
</body>
</html>
left menu (category) category_frame.asp
Code:
<html>
<head>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Category Frame</TITLE>
<script type="text/javascript" src="javascripts/preLoadingMessage.js"></script>
</head>
<frameset cols="100%" rows="25,0,25,0,25,0,25,0,25,*" frameborder="0" framespacing="0" ID="CategoryBar">
<frame src="category_tab.asp?tab=my_profile" name="tab_my_profile" marginwidth="0" framespacing="0" marginheight="0" scrolling="no" frameborder="0">
<frame src="category_menu.asp?category=my_profile" name="menu_my_profile" marginwidth="0" framespacing="0" marginheight="0" scrolling="auto" frameborder="0">
<frame src="category_tab.asp?tab=my_discrepancy" name="tab_my_discrepancy" marginwidth="0" framespacing="0" marginheight="0" scrolling="no" frameborder="0">
<frame src="category_menu.asp?category=my_discrepancy" name="menu_my_discrepancy" marginwidth="0" framespacing="0" marginheight="0" scrolling="auto" frameborder="0">
<frame src="category_tab.asp?tab=unit_discrepancy" name="tab_unit_discrepancy" marginwidth="0" framespacing="0" marginheight="0" scrolling="no" frameborder="0">
<frame src="category_menu.asp?category=unit_discrepancy" name="menu_unit_discrepancy" marginwidth="0" framespacing="0" marginheight="0" scrolling="auto" frameborder="0">
<frame src="category_tab.asp?tab=unit_checklist" name="tab_unit_checklist" marginwidth="0" framespacing="0" marginheight="0" scrolling="no" frameborder="0">
<frame src="category_menu.asp?category=unit_checklist" name="menu_unit_checklist" marginwidth="0" framespacing="0" marginheight="0" scrolling="auto" frameborder="0">
<frame src="category_tab.asp?tab=my_checklist" name="tab_my_checklist" marginwidth="0" framespacing="0" marginheight="0" scrolling="no" frameborder="0">
<frame src="category_menu.asp?category=my_checklist" name="menu_my_checklist" marginwidth="0" framespacing="0" marginheight="0" scrolling="auto" frameborder="0">
</frameset>
</html>
what i can't figure out is where (which page and/or frame) i put the javascript code...i have put in the left (category) frame but the js halts loading...
here is the .js
Code:
document.write('<div id="loading"><br><br>Please wait...</div>');
// Created by: Simon Willison | [URL unfurl="true"]http://simon.incutio.com/[/URL]
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
document.getElementById("loading").style.display="none";
});
i need the loading message for the fact ...withing these frames i am building serverside scripts that create large recordsets for a javascript tree...this is my initial thought; however, if the loading message...for whatever reason cannot be done in this situation...i will go w/ plan b - ajax (onclick event to open each tree node hits server vs all-at-once)
so, w/ that in mind..
1. is it possible to do what i am asking?
2. how?, if possible
3. where does it go?
i am a total js newbie...i work serverside code and could use some help...it's greatly appreciated