Saturday, March 24, 2012

This Object in Javascript Causes Error

All,

I'm developing an website using ASP .NET. I have developed a menu
structure based on JavaScript. This JavaScript file is called by an
UserControl to generate the menus.

It works fine for the WebPage that lies in the same folder. But when i
use the same control in another page (another directory) it's not
working property. It shows an error "Object Required".

The statement is as given below,

this.css= "/scripts/intranet.css"
Also I'm not able to access the document object from Javascript.

TIAI think the problem is with the following statement,

this.css=
bw.dom?document.getElementById(obj).style:bw.ie4?d ocument.all[obj].style:bw.ns4?eval(nest+"document.layers."
+obj):0;

This statement set css value based on the Browser type. Is there any
problem in declaration?

0 comments:

Post a Comment