-
Javascript question
Hi,
We are trying javascript layers and document.all functionality in our project.
We are facing some problems like it will work fine in IE but not in Netscape.
What could be the reason? How we can overcome this kind of problems. Awaiting
some answers.
thanks
aditya
-
Re: Javascript question
document.all is not recognised by netsacpe, as far as i remember.
here's an example of the equivelants, in the 2 browsers...
<SCRIPT LANGUAGE="JavaScript">
<!--
if (is_ie4up) {
document.all.maint.style.display = "none";
document.all.submission.style.display = "none";
document.all.nuggets.style.display = "none";
}
if (is_nav4up) {
document.ids.maint.display="none";
document.ids.submission.display = "none";
document.ids.nuggets.display = "none";
}
//-->
</SCRIPT>
hope that helps??
"Aditya K N" <adityakn@hotmail.com> wrote:
>
>Hi,
> We are trying javascript layers and document.all functionality in our
project.
>We are facing some problems like it will work fine in IE but not in Netscape.
>What could be the reason? How we can overcome this kind of problems. Awaiting
>some answers.
>thanks
>aditya
-
Re: Javascript question
Here is a better example :
Grosso modo,
the IE syntaxe is : document.all.layername
the NS 4.x syntaxe is : document.layers["layername"]
the NN6 syntaxe is : document.getElementById("layername")
IE and NN6 often requires style, NOT nn4.
examples for visibility :
IE : document.all.mydiv.style.visibility = "hidden"; // could be "visible"
NS4 : document.layers["mydiv"].visibility = "hide"; // could be "show"
NN6 : document.getElementById("mydiv").style.visibility = "hidden"; // could
be "visible"
Visit good sites on DHTML for more precision, like:
http://www.webreference.com/dhtml/
http://www.webtools.com/toolbox/dhtml
"»«T®3|V|3" <X|L3@xtr3m3.org.uk> a écrit dans le message news:
3ad33201$1@news.devx.com...
>
> document.all is not recognised by netsacpe, as far as i remember.
> here's an example of the equivelants, in the 2 browsers...
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> if (is_ie4up) {
> document.all.maint.style.display = "none";
> document.all.submission.style.display = "none";
> document.all.nuggets.style.display = "none";
> }
> if (is_nav4up) {
> document.ids.maint.display="none";
> document.ids.submission.display = "none";
> document.ids.nuggets.display = "none";
> }
> file://-->
> </SCRIPT>
>
> hope that helps??
>
>
>
> "Aditya K N" <adityakn@hotmail.com> wrote:
> >
> >Hi,
> > We are trying javascript layers and document.all functionality in our
> project.
> >We are facing some problems like it will work fine in IE but not in
Netscape.
> >What could be the reason? How we can overcome this kind of problems.
Awaiting
> >some answers.
> >thanks
> >aditya
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|