473,761 Members | 8,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

function not working in Netscape

I'm working with a function which is part of my navigation menu. I'm
working with hidden and visible layers and can't seem to determine why
this code will not work in netscape...I'm sure it has something to do
with the "show" and "hide" wording...any ideas?

function MM_showHideLaye rs() {

var i,p,v,obj,args= MM_showHideLaye rs.arguments;
for (i=0; i<(args.length-2); i+=3) if
((obj=MM_findOb j(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?' visible':(v='hi de')?'hidden':v ; }
obj.visibility= v; }
}
Jul 20 '05 #1
1 1520
On 7 Aug 2003 10:08:04 -0700, Eric <er********@mar kmonitor.com> wrote:
I'm working with a function which is part of my navigation menu. I'm
working with hidden and visible layers and can't seem to determine why
this code will not work in netscape...I'm sure it has something to do
with the "show" and "hide" wording...any ideas?

function MM_showHideLaye rs() {

var i,p,v,obj,args= MM_showHideLaye rs.arguments;
for (i=0; i<(args.length-2); i+=3) if
((obj=MM_findOb j(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?' visible':(v='hi de')?'hidden':v ; }
obj.visibility= v; }
}

looks like cookie-cutter DreamWeaver code.

no matter. in this line:

v=(v=='show')?' visible':(v='hi de')?'hidden':v ;

at first glance it seems it should read
v=(v=='show')?' visible':(v=='h ide')?'hidden': v;

because it looks syntactically equivalent to

if (v=='show') {
v='visible'; }
else if (v=='hide') {
v='hidden'; }
else { v = v; }

and (v='hide') will always evaluate true to the ternary ?: anyway.

--
Charles Banas
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2516
by: edward hage | last post by:
Hello, I have a Linux machine and I use Netscape 7.1 which I upgraded from Mozilla. I downloaded j2sdj-1.4.2_02 and I have installed the plugins as followes: in .mozilla/plugins- directory a link to : edward@linux:~/.mozilla/plugins> ls -l totaal 0
4
2765
by: Yvan J. Gagnon | last post by:
I am encountering a strange problem in Netscape 7 with a CFM file I am trying to troubleshoot (the page is working fine in NS Communicator and IE). Below is a sample of the problematic line of javascript code. Note that in the actual file, I've surrounded the variable '#cookie.cookiename#' with CFOUTPUT tags: document.write('<input type="Hidden" name="affiliate" value="#cookie.cookiename#">'); When I load the document in Netscape 7, I...
1
3799
by: Martin O'Rourke | last post by:
All, I am trying to use a URL to call some javascript to do something, which is working fine in IE6 but using the same code in Netscape 4.79 I cannot get it to work at all. I get no errors, but no results either, Netscrape just sits there and does nothing ? Below is an emample of what I am attempting to do. I have had a search
3
3556
by: KathyB | last post by:
Hi, I've tried everything I can think of. Using the script below, I thought on submit my ConfirmSave function would run, then if true returned, would run my form action. At this point it appears to be skipping the function altogether. I'm also unable to get the textbox.value since I need to use variable for the form name and input element name. I'm fairly new to this...please tell me where I am going astray...Thanks. HTML element:
15
4214
by: chirs | last post by:
I am trying to understand a piece of code. In a javascrpit file, there is a function: function ItemStyle(){ var names=; addProps(this,arguments,names,true); }; In the html file, it calls the function as:
2
2071
by: Geniium | last post by:
Hello, Im looking to make work my script on both IE and Netscape. It works fine in IE, but netscape cant handle "dynamic" variables. I need some help! Is there a CORRECT way to pass a string as parameter and then use it as an object in Netscape? IE does that without problem... and Netscape seems not able to handle it...
2
16863
by: schieco | last post by:
The following code always prints the debug lines inside the conditional if statement before and after the alert statement when the session has timed out, but the alert and redirect only appear/work in certain situations. <% // Check for expired session log.debug("session ID = " + session.getAttribute("session_loginID")); if (session.getAttribute("session_loginID") == null)
10
4590
by: VictorG | last post by:
Hello, I am new to JS and am trying to add some HTML into a JS function. So that when called the script as well as the HTML will be invoked. Is there some type of embed mechanism, sort of the reverse of embedding JS in an html page with the script tag. (which is what I am doing in this case) Is this even possible?
20
2691
by: chris.schwalm | last post by:
This is part II of this <a href="http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/cd54951e0ea277de/639c67f2f7cadb1f?tvc=2&q=Simple+HTML+read%2Fwrite+question#639c67f2f7cadb1f"> post</a>. I am creating a java script that bascially reads a webpage - forwards it to an external program/parser/servlet - then overwrites the webpage with a slightly modify version. Basically I have two questions: (1) Do I need to set my...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9988
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.