News

Log In Sponsors
Partner Sites

Error on Page



when I run this page on the browser on the bottom left corner I am getting "Error on page" with warning yellow triangle sign. If I click on this triangle sign the information below shows in a pop up window. Line: 726 Char: 4 Error: 'length' is null or not an object Code: 0 URL: http://....../WardenConfig/deviceNoiceAnalysis.jsp I did some experiment on this issue and I found when we remove this <body onLoad="setDefaultNoiseTime();"> form the JSP the error does not exist. So I beleive this javascript error is generating in the function "setDefaultNoiseTime()". But I could not figure out what is the problem in this function. The function is below: function setDefaultNoiseTime() { // Find the current date and hour // Set the start date and time to the current date and hour // Set the end date and time to the current date and hour var now = new Date(); var currentYear = "" + now.getYear(); var currentMonth = "" + (now.getMonth() + 1); // 1-12 // if( currentMonth.length == 1 ) // { // currentMonth = "0" + currentMonth; // } var currentMonthName = getMonthName( currentMonth ); var currentDay = "" + now.getDate(); if( currentDay.length == 1 ) { currentDay = "0" + currentDay; } var currentHour = "" + now.getHours(); // 0-23 if( currentHour.length == 1 ) { currentHour = "0" + currentHour; } // Now select the appropriate index in each dropdown : setSelection( document.formSettings.selectStartYear, currentYear ); setSelection( document.formSettings.selectStartMonth, currentMonthName ); setSelection( document.formSettings.selectStartDay, currentDay ); setSelection( document.formSettings.selectStartHour, currentHour ); setSelection( document.formSettings.selectEndYear, currentYear ); setSelection( document.formSettings.selectEndMonth, currentMonthName ); setSelection( document.formSettings.selectEndDay, currentDay ); setSelection( document.formSettings.selectEndHour, currentHour ); } Please help me to resolve this issue. Thanks....

Click here to read the whole forum topic