View Full Version : getting "object required" errors in IE

09-18-2005, 06:23 PM
I can't for the life of me find why this is happening. In the last 4 functions in the .js file IE keeps throwing me an error. I've checked and am 99% sure that only the right objects are getting passed to the functions. Could someone take a look, maybe find what's wrong with my code?


09-18-2005, 07:04 PM
Hi there crazygamer,

you have a syntax error, which I have highlighted...

function decorDragLeft(divToDecor) {
divToDecor.style.borderLeft = "3px solid blue";
divToDecor.firstChild.style.width = "83px";
divToDecor.style.width = "87px";
divToDecor.decor = "dragLeft";*/

...remove that and see if that provides a cure. :)


09-18-2005, 07:16 PM
Oops :eek:, thanks for pointing that out. However, the problem is still there and that "*/" was just from me commenting stuff out and playing with it to get it to work.

09-18-2005, 07:32 PM
Hi there crazygamer,

you have not, as yet, removed the */ from your script. :eek:
I suggest that you do so right away, so that the problem may be further investigated. :)


09-18-2005, 07:50 PM
Sorry, updated in on my computer, forgot to FTP it to the server. Should be fixed now (and still not working).

I've looked through my script a few more times and still can't find the problem. I do know that it's in the last 4 functions though because when I comment them out IE stops throwing the errors.

09-18-2005, 08:22 PM
I solved it!

The function that was throwing the error need a check if the "firstChild" of the element existed (if(!myDiv.firstChild) return;).

thanks for the help