473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Safari browser javascript problem

The page appears when all the images are loaded, it works in all browsers, but safari does not turn the body visible:

<script language="javascript">
<!--
function preload() {
imgs = document.images;
preloadedimg = true;
for (var i = 0, total = imgs.length; i < total; i ++)
preloadedimg = (preloadedimg && imgs[i].complete);
if (preloadedimg) {document.body.style.visibility = "visible";}
else setTimeout("precargar()", 100);
}
//-->
</script>

<body onload="preload()" style="visibility:hidden;">
</body>

The problem can be in:
Document.body.style? Safari does it refer otherwise to body?
Thank you for attending my problem.
Mar 29 '07 #1
1 1974
iam_clint
1,208 Expert 1GB
if (preloadedimg) {document.body.style.visibility = "visible";}you might try
if (preloadedimg) {document.getElementsByTagName('body')(0).style.vi sibility = "visible";}

minus the space in visibility the forums add that sometimes
Mar 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bernard | last post by:
Hi, I am suddenly getting Safari script errors with the following user agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8 In a...
2
by: Marcia Gulesian | last post by:
How can I determine the version of Safari (for example, 1.0.2 or 1.2.2) that's downloaded a document?
5
by: Kim Forbes | last post by:
Hi, I realize my first problem is that I'm using browser detection and not feature detection. Maybe someone can help me understand feature detection. This script works in every browser that I...
2
by: laredotornado | last post by:
Hi, Is it possible to fool Javascript running on a Mac Safari web browser into believing it is a PC IE browser? We have the following JS code that is detecting both Mac and Safari. Sadly, we do...
5
by: Bill Cohagan | last post by:
I'm having some serious difficulties with my ASP.Net 2.0 app rendering in Safari 2.0.3. The most immediate problem is that the menu control doesn't seem to work at all, particularly the use of...
4
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in...
34
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
5
by: Peter Michaux | last post by:
Hi, I just did a bunch of testing and was surprised with the results. If anyone doesn't know this stuff here is what I found about event.clientX. The event.clientX property in Safari is in...
7
by: Tom | last post by:
I have an oo-type javascript program running perfectly on IE 6.0+, FF 1.5+, and Opera 7+ on Windows 98+, Linux (RH 9, FC 6), and Mac OS X. 4. As usual, the Safari browser is not working correctly,...
1
by: rynato | last post by:
I ran into an interesting problem while working on a form: I have a drop down list (think <form><select><option>...) of 'open sessions' which a user can choose from to continue entering data....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.