...

View Full Version : ASP Popups stopped working



jim_denney
02-26-2007, 02:50 PM
We have an ASP page that allows editing of data in a tabluar format. Because the number of fields displayed is so large (about 50), we allow the users to click on the first field to display a popup window of all the fields for editing. The popup window is calling an ASP page for its information. Friday morning it was working fine, Friday afternoon it started displaying a "File Not Found" error. The pages have not changed. Any idea as to why this started happening.

We have two other fields on the first ASP page which also call popups, they still work fine. They are calling HTML pages for the popup information.

To insure that nothing has changed, if I run the backup copy I keep on my local drive, I get the same "File Not Found" error, and I know those files were not changed.

miranda
02-26-2007, 02:59 PM
Assuming that the error is not showing up because someone moved the file,

do you have friendly errors turned on for the machine? if yes then that is sometimes the error that is shown when there is an error in the code. Make sure friendly error messages are turned off (tools>Internet options>advanced>Uncheck show friendly http errors) and try it again. If you have an error on the page you will now see the error.

jim_denney
02-26-2007, 03:32 PM
Thanks for the prompt response.

No, since I am doing development, I have friendly messages turned off. It just gives me the "Page Con Not Be Found" error, but does not tell me which page or give me a line number.

The popup being called includes a javascript file for processing dates, a css file and two HTML files which are also called from the first ASP page (and they are working on that page). All files are located in the directory where they have always been.


The code on the first page that calls the popup is:

//=======================================================

function windowOpener(url,name,args) {
if (typeof(popupWin) != "object"){
popupWin = window.open(url,name,args);
} else {
if (!popupWin.closed){
popupWin.location.href = url;
} else {
popupWin = window.open(url,name,args);
}
}
popupWin.focus();
}

//=======================================================

function puind(i,id) {
document.frmRoster.TbxCN.value=i;
strPath = "rstr_individ2.asp?n=" + i + "&id=" + id;
strArguments = "height=505,width=600,left=50,top=50,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,di rectories=no,status=yes";
popWin = windowOpener(strPath, "popInd", strArguments);
}

//=======================================================

miranda
02-26-2007, 04:56 PM
In IE, if you do a right mouse click on the page with the 404 error then click properties it should tell you what page it is trying to find.

jim_denney
02-26-2007, 05:43 PM
Is this a new feature? I am running IE 6.0, but checking properties just gives me the URL of the error page with no reference to other pages that do or do not exist.

Do you think it is possible that the error is not that a page can be not found, but IE is incorrectly catagorizing the error and calling it a 404.

The web pages being called are in a subdirectory of the main web site. Some changes were made in the style sheet of the root directory, but not in the style sheet in the subdirectory where the pages are causing the problem. However, we have found that it is not loading the style sheet in the subdirectory but is still using the one from the root directory, even though the style sheet exists in the subdirectory under the same name.

As I stated earlier, no files were changed in the subdirectory, it just started generating errors in the middle of the day. I had been thinking an automatic update was causing the problem, but IT says they do not do automatic updates and no updates were performed last Friday.

oracleguy
02-26-2007, 06:08 PM
The browser doesn't determine the error number to display, that is something the web server software does.

I assume you've looked in the subdirectory and made sure the file still exists even if no changes were supposed to of been done? If it still does, what happens if you just manually enter the URL for the page? If it comes up, you know its a problem with the code that calls the page.

jim_denney
02-26-2007, 07:22 PM
IE version does not matter, no page is returned. I copied an old style sheet in and still got the same error, so that removes the style sheet from the equation.

I can type in the url and it starts to load the page, but blows because I do not pass it parameters. When I pass one parameter it goes farther, but blows up. When I pass it the second parameter, it goes to the "Page Can Not Be Found". I am going to start looking there, maybe a change was made to the database.

Thanks for your help. We are finding the page, it just isn't displaying. It looks like it is a data issue at this point. I just have a hundred lines of ASP code to decipher.

miranda
02-26-2007, 07:22 PM
The only time I have seen people get the 404 error message on something other than a bad pointer is when they have friendly error messages turned on and the page throws an error.

what do the servers error logs show for the 404 errors? Viewing them should help.

Are you sure no code changes were made to the page? or if this is dynamic and loaded from a database, was there changes made to the data?

If this is a live site try copying the page and renaming the copy so that noone else will hit it while you are testing. Now you can do response.Write on any value that you think is causing the problem. You could also change the code that opens the popup to show the address bar. this may make the error more noticeable to you. If there was code changes made, make sure there was no typo's made on any variables that may be passing data to your javascript function(use of OPTION EXPLICIT helps to identify these types of errors).

jim_denney
02-26-2007, 08:03 PM
The server event log offered no useful information. I took all of the files back to 1/9/2007. At that time everything was working fine. I still get the error.

I stripped most of the input fields out of the popup window where the error is coming from. It is displaying, but I am getting another error (I took out something I shouldn't have). But this confirms my suspision that it is data related. I will have to get the page displaying without an error, then start adding the items I took out one at a time until I find the offending line of code.

jim_denney
02-26-2007, 10:44 PM
To close this problem, it was a data issue. To keep from damaging live data, a test database was set up, but the popup page we were calling still contained references to the live data. When passing information from the parent window to the popup, the ASP was not able to locate the data it was asked to retrive because it was looking at the wrong database. Just to test our patience and debugging capabilities, IE decided to send us a 404 error message.

Thanks again for your help in this one.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum