[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Problem with MAC

Posted on 2002-03-06
13
Medium Priority
?
149 Views
Last Modified: 2010-04-09
Hi Guys,
I have got a problem while testing with MAC. We have code which works in NT (IE 4 and above, NS 4 and above) but same thing does not work in MAC (IE and NS above 4). Works only for IE 4 and NS 4 in MAC...

Here is the code:
function jsfShowAlert(alertName)
{
     var browser = navigator.appName;
     var version = parseInt(navigator.appVersion);
     var ns4 = (document.layers)? true:false;
     var ie4 = (document.all)? true:false;    
     if (ns4) document.layers["customerownedalert"].visibility = "show";
     else if (ie4) document.all.customerownedalert.style.visibility = "visible";
}

function jsfHideAlert(alertName)
{    
     var browser = navigator.appName;
     var version = parseInt(navigator.appVersion);
     var ns4 = (document.layers)? true:false;
     var ie4 = (document.all)? true:false;    
     if (ns4) document.layers["customerownedalert"].visibility = "hide";
    else if (ie4) document.all.customerownedalert.style.visibility = "hidden";
}


Any help to make it work for MAC as well as NT above IE4 and NS4

thanks in advance!
Sanjeev
0
Comment
Question by:snjkrva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
  • +1
13 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6846751
Hmm...all you are trying to do is show or hide a layer right?

Anyway, I do not see the variable "alerName" coming back in the rest of the functions..not that it has to matter...

Try using these functions if you can:

function showLayer(ALayerName)
{
  if (ALayerName != "")
  {  
    (document.layers) ? eval("document." + ALayerName + ".visibility = 'show'") : eval("document.all['" + ALayerName + "'].style.visibility = 'visible'");
  }
}

function hideLayer(ALayerName)
{
  if (ALayerName != "")
  {
    (document.layers) ? eval("document." + ALayerName + ".visibility = 'hide'") : eval("document.all['" + ALayerName + "'].style.visibility = 'hidden'");
  }
}

They always work for me on both Macintosh and PC...

Max.
0
 

Author Comment

by:snjkrva
ID: 6847547
Hi DreamMaster,
I don't see anything different than what i pasted...except that you have eval function.
Please tell me if this code works in ie, ns 4+ in mac...
we tested and it works in nt though.

regards,
snjkrva
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6847588
This one is the one my company uses all the time and it works with all versions 4 and up...on both windows NT and Mac platforms... :)

Max.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:snjkrva
ID: 6848690
Hi DreamMaster,
I don't see anything different than what i pasted...except that you have eval function.
Please tell me if this code works in ie, ns 4+ in mac...
we tested and it works in nt though.

regards,
snjkrva
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6848696
Please next time hit "reload question" at the top of the page it saves a comment.. :)

Max.
0
 

Author Comment

by:snjkrva
ID: 6851448
Hi DreamMaster,
I don't see anything different than what i pasted...except that you have eval function.
Please tell me if this code works in ie, ns 4+ in mac...
we tested and it works in nt though.

regards,
snjkrva
0
 

Author Comment

by:snjkrva
ID: 6851758
DreamMaster, your solutions works in MAC for Netscape...I still dont see in IE....i know code looks simple but is there any reason IE in MAC doesnt like Dynamic HTML at all?

thanks for giving your time,
snjkrva
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6852021
On the Macintosh, IE sucks, and even Netscape is better, but it should work on IE on the Macintosh as well...could you show the code you are using exactly so I can check this myself?

Max.

P.S. Could be that you would have to wait until monday until I can check it...it is weekend and I do not have a Mac available at home...I might be able to see it from the code alone though...
0
 

Author Comment

by:snjkrva
ID: 6880778
Hi DreamMaster,
Our 'div' tag is not working in IE, MAC. If you have sample code which has div tag inside the table and then code to show and hide the layer, that will help.

thanks in advance
snjkrva

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6975491
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Cd&
0
 
LVL 19

Accepted Solution

by:
DreamMaster earned 200 total points
ID: 6977064
Using DIVs inside tables could very well be your problem, still...to fix it, I would need to see your code...

As far as I can tell I gave you all sorts of help and didn't ask for the code for no reason. The functions I provided you with are very general and work in IN and NS on both PC and Max. I have been using them for a long time.

Max.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7065556
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to DreamMaster

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7066746
Thanks, Cd&, for your help here.

This has been finalized today, and monitoring for comments.

Moondancer - EE Moderator
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question