Hello All.

I am currently working on a project which basically makes splash screens for plasma displays. Details on objects are stored in an Oracle database accessed using ASP.NET and requested using AJAX. I have already got a working version of this project which people are happy with but I have decided that now I know more about JavaScript I will refactor my code and make every thing all nice and easy to follow. The previous version ran a bit slow.

I have more or less started from scratch building the first class which is the Object class (this creates HTML elements for objects, gets the contents of the object, sets up an interval to refresh the contents of an object etc). I have not got as far as calling this class from any thing yet (it will be called by another class which has not been written yet) but I pressed play on my project to see if there were any obvious errors that were going to pop up. A couple of silly mistakes surfaced which i corrected so now the interpreter gets through passed my class code ok but then Prototype or Scriptaculous seems to do something once the page has loaded and then it is throwing an error.

Line 1508 in Prototype

if (Object.isString(element))
    element = document.getElementById(element || ''); 
  return Element.extend(element);

Microsoft JScript runtime error: Object doesn't support this property or method

I checked that my Prototype and Scriptaculous code files were up to date and they were but I am still getting the error. I made a small modification to the Scriptaculous Drag n Drop class which worked in the previous version of my code.

It must be the way I am creating my class, there is probably something obviously wrong with it (I am not that experienced with OOP using JavaScript and Prototype). No one in my office knows JavaScript so I have had a google but feel I'm getting no where.

I uploaded my code to my web space:
http://www.tonicblue.co.uk/broken/

Any pointers would be great. Sorry for the long winded post.
Thanks in advance

I have solved it.

Was an obvious mistake. I called my class Object and that class already exists withing prototype.js

Thanks any way

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.