//execute after page load is complete$(function() {gethw ();}); //triggered when the user changes the size of the browser$ (window). Resize (function() {sethw ();}); //Run once every 500 millisecondsWindow.setinterval ("Geth ()", 500);//gets the height of the page and passes it to the element of the parent pagefunctionGetsubpageh () {varParentworkdiv = $ ("#workDiv", parent.document);//Work Area Div varParentleftdiv = $ ("#leftDiv", parent.document);//left menu Div varParenttopdiv = $ ("#topDiv", parent.document);//Top Div varParentbotdiv = $ ("#bottomDiv", parent.document);//Bottom Div varParentmiddiv = $ ("#middleDiv", parent.document);//Middle Div varThisbody = $ ("body");//this page varParentheight = $ ("Body", parent.document). Height ();//Parent page Available height varParentwidth = $ ("Body", parent.document). width ();//Parent Page Available width if((Thisbody.height () < Parentheight) && (Parentleftdiv.height () <parentheight)) {Parentmiddiv.height (Parentheight-Parenttopdiv.height ()-parentbotdiv.height ()); } Else { if(Thisbody.height () >parentleftdiv.height ()) {Parentmiddiv.height (Thisbody.height ()); } Else{parentmiddiv.height (Parentleftdiv.height ()); }} parentworkdiv.width (Parentwidth-Parentleftdiv.width ());//Set Width//alert (parentmiddiv.height () + "-" + parentheight);}//set the width of the page's work areafunctionsethw () {varLeftdiv = $ ("#leftDiv"); varWorkdiv = $ ("#workDiv"); //get the width of the browser varHtmlwidth =$ (document). width (); varW = htmlwidth-leftdiv.width (); Workdiv.width (w);}//Show Current TimefunctionShowTime () {//Get Current date varDateTime =NewDate (); varDatestr; //Define Week varWeek = "Week"; varDayWeek =NewArray ("Day", "one", "two", "three", "four", "five", "six"); Week+ = Dayweek[datetime.getday () + 1]; //yearsDatestr = datetime.getfullyear () + "year"; //Month if(Datetime.getmonth () < 10) {Datestr+ = "0"; } datestr+ = (Datetime.getmonth () + 1) + "Month"; //Day if(Datetime.getdate () < 10) {Datestr+ = "0"; } datestr+ = Datetime.getdate () + "Day " + Week + " "; //when if(Datetime.gethours () < 10) {Datestr+ = "0"; } datestr+ = Datetime.gethours () + ":"; //points if(Datetime.getminutes () < 10) {Datestr+ = "0"; } datestr+ = Datetime.getminutes () + ":"; //seconds if(Datetime.getseconds () < 10) {Datestr+ = "0"; } datestr+=datetime.getseconds (); document.getElementById ("Lbltime"). InnerHTML =datestr;}
JS Memo--Child parent page Get element properties, display time