PRB: Problem Submitting SOM Enabled ASP Pages Under Netscape Browsers

ID: Q229615


The information in this article applies to:
  • Microsoft Visual InterDev, version 6.0


SYMPTOMS

When using Netscape Navigator to view an Active Server Pages (ASP) page that uses the Scripting Object model, one of the following behaviors occurs:

  • The browser is redirected to the default page of the Web site.


  • A directory listing of the files and folders may appear in the browser.


  • The following error message may appear:
    Directory Listing Denied
    This Virtual Directory does not allow contents to be listed.



CAUSE

These behaviors occur because the Scripting Object Model (SOM) uses a hidden form element, _method, to track whether a page redirection is necessary. When the _method element contains anything other than an empty string, the SOM interprets it as a page it to which it should redirect the user.

Under Netscape Navigator, the _method element may contain an erroneous value of " " (two spaces), which causes the SOM to attempt a page redirection to a relative path of " " (two spaces) on the Web server. Doing this causes Internet Information Server to attempt to retrieve the default page for the Web site, such as Default.asp, Default.htm, or Index.htm.

Depending on the configuration of your Web site, you may see one of the behaviors described above.


RESOLUTION

You can work around this problem by adding the following code to the window_onload client event handler of the page exhibiting the behavior. This code checks for both a single space and a double space because different versions of the Netscape browser will insert either 1 or 2 spaces.


function window_onload() {
    if (document.thisForm._method.value==" " | document.thisForm._method.value=="  ")
    document.thisForm._method.value="";
  } 


MORE INFORMATION

The third-party products discussed in this article are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

Additional query words:

Keywords : kb3rdparty kbASP kbVisID600 kbGrpASP kbDSupport
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: February 3, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.