Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6604207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:07:24+00:00 2026-05-25T19:07:24+00:00

I’ve got an ASP.NET site running locally on my XP system using IIS Express.

  • 0

I’ve got an ASP.NET site running locally on my XP system using IIS Express. There is a live version of the site running on a Windows server.

In the web pages, often the Javascript will reference a form on the page using the style document.formName, where formName is the name of the form. As far as I know, this is a cross-browser method, along with document.forms.formName and document.forms[0] and so forth.

On my local development site, the reference document.frm1 (I know, bad naming practice) errors out; it is undefined. On the other hand, document.forms.frm1 works fine. Strangely, this doesn’t occur on the server, although both pages are identical as far as the code goes. I’ve double checked with Firebug, and in both IE8 and Firefox 6.

Another weird part: checking with Firebug, document.frm1 is undefined, but document.frmClose (another form) exists! Huh?!

Anyone experienced this before?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:07:25+00:00Added an answer on May 25, 2026 at 7:07 pm

    EDIT 1

    I did some experimentation, and found that the id property is used for document.forms, whereas the name property seems to be used for document.formName

    http://jsfiddle.net/GVjsv/


    Original Answer

    Ensure that your javascript is not executing before DOM is ready. One way to help is to put your javascript at the bottom of the page, or if you’re using a framework be sure to wrap the code in a ready-type function:

    jQuery: http://api.jquery.com/ready/

    Mootools: http://mootools.net/docs/core/Utilities/DomReady

    Vanilla javascript:

    window.onload = function() {
      // Code to be run.
    } 
    

    The reason that this is inconsistent between servers could be that the local development server loads the page more quickly than the live server does. The timing works out so that you usually don’t get the same error in both places – the emphasis is added because if you tried enough times, you would probably be able to reproduce the error in both places.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.