dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Javascript works on IIS but not Apache server

  1. #1
    Join Date
    Apr 2005
    Posts
    2

    Javascript works on IIS but not Apache server

    I have some DHTML/javascript based menus that I have created for a site. Initially, I created and tested the site on IIS and everything worked fine. However, when the site was exported to an Apache based site, I keep getting a runtime error, line 16, object expected.

    The apache based site/page that has the error is:
    http://www.jncdata.com/services/index.html

    The IIS based site/page that works is
    http://www.rads-inc.com/services/index.html

    Thanks in advance for any assistance.

  2. #2
    Join Date
    Dec 2004
    Posts
    8,637
    Client-side errors have nothing to do with the server operating system. One problem is that I found the following in the beginning of one of your documents:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <!--  Created with the CoffeeCup HTML Editor 2005  -->
    <!--           http://www.coffeecup.com/           -->
    <!--         Brewed on 3/5/2005 9:31:57 AM         -->
    <head>
      <title>JNC Product Listings</title>
    </head>
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <!--  Created with the CoffeeCup HTML Editor 2005  -->
    <!--           http://www.coffeecup.com/           -->
    <!--         Brewed on 3/5/2005 9:31:57 AM         -->
    <head>
      <title>JNC Service Listings</title>
    </head>
    
    <body>
    ...etc...
    Otherwise, your error is occurring in your onload function. The initializeMenu() function cannot be found. Thus, I'd say that your administratorMenu.js source is not available in the correct place on the Apache server.
    Last edited by phpnovice; 05-03-2005 at 08:53 PM. Reason: Formatting.

  3. #3
    Join Date
    Apr 2005
    Posts
    2
    Yep, that did it. I transferred this from a IIS server to Apache. The file names were different cases than what was being called from the HTML. Thanks.

  4. #4
    Join Date
    Dec 2004
    Posts
    8,637

    Thumbs up You're welcome.

    ...and did you remove the doubled HEAD section?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles