Error: Object expected at line number

By bn_satish ยท 5 replies
Aug 4, 2008
  1. Greetings All,

    I know this is the most asked question on the Net, the difference is does system changes or updates lead to this issue.

    Suppose a site is working perfectly fine for sometime and one fine day we get a javascript error on a particular page. On clicking the details you will see the error: Object expected at line number ....

    My question is: Is there any way a system updates or changes to the system or XML version upgrades leads to such errors, or is it purely due to HTML coding errors.

    Any inputs or pointers will be helpful.

    Thanks and Regards,
  2. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    There is another (more likely) solution

    Your system requires updates!

    Really these security/Firewall/Java/browser/Service Packs/Drivers and even computer Hardwares updates are just too frequent these days, which would indirectly specify "coding" errors

    When the code was released (by the major websites) it worked!
    Then everything else updated, should the coders continue updating too?
    Or just leave those small errors, until another revamp of the webpage.
    No one can keep up, I tell you. (Unless the page is very basic, which in that case, you probably wouldn't see any errors, in the first place)

    When I see these common errors being displayed, I just ignore them; as progress!
  3. VBAssassin

    VBAssassin TS Rookie Posts: 19

    Thats an excuse for bad coding. JS especially (which is what that error sounds like) should be coded using a "graceful degradation" method where if the browser can't support the JS code, it degrades to produce something the browser can use. An example would be here:

    Where if JS is disabled a normal textarea is shown, otherwise, if the browser is capable of rendering a rich text area, then it shows the rich text area instead for the visitor to use - no errors ;-)

    Kind regards,
  4. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    No it's not
    All websites update for lots of reasons
    New technology, new software, new ways of handling things
    If they allow degrade then this will also degrade their purpose - advertising their webpage
  5. VBAssassin

    VBAssassin TS Rookie Posts: 19

    I only said that in regards to JS... some things i know require new technology in order to function such as flash requiring a minimum version of the browser plugin.

    But even then, you have a choice. You could go about degrading to say a message that is nicely formated saying "Due to bla bla bla, we require you to install flash player 9 to make use of bla bla bla, and you can download it here"... instead of a horrible pluggin required box. Thats graceful degradation in terms of Flash, not JS... another common name is "error handling" ;-)

    Most upgrades are backward compatible anyway, it's previous versions of technology that you should work with in mind.

    There's no excuse for horrible "errors" - especially if you have clients and your reputation (and money) is at stake for clients seeing errors.

    Kind regards,
  6. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    Oh I agree with that
    And yes I've seen those types of messages

    Good point, and well debated :grinthumb
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...