473,728 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Safari browser javascript problem

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

<script language="javas cript">
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.visibilit y = "visible";}
else setTimeout("pre cargar()", 100);

<body onload="preload ()" style="visibili ty:hidden;">

The problem can be in:
Document.body.s tyle? Safari does it refer otherwise to body?
Thank you for attending my problem.
Mar 29 '07 #1
1 1991
1,208 Recognized Expert Top Contributor
if (preloadedimg) {document.body. style.visibilit y = "visible";} you might try
if (preloadedimg) {document.getEl ementsByTagName ('body')(0).sty le.visibility = "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

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 frameset scenario, the framesetting document (top) contains a
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?
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 need it too, except Safari 1.0.2 Here is the script. Please tell me if there is any more information I can give you.
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 not have control over the code. // Global variables for platform branching var NN, IE, MAC, browserVersion
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 dynamic levels. I've Googled around a bit and determined that the problem is not so much with Safari as it is with ASP.Net inaccurately determining the browser capabilites for that browser. In the 2.0 Framework it appears that browser caps are...
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 FireFox and Safari it appears as a narrow column of text with only 2-3 words per line. Here is the code: function showAll()
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.
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 page coordinates. In IE, Opera, Firefox event.clientX it is in window coordinates. This means a lot when trying to determine event location in page
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, and because it lacks an internal debugger, I'm completely unable to see what the problem is. So I downloaded that "Drosera" debugging program, but I'm finding it useless for the following reasons: 1) I cannot "Attach" it to Safari 2.0...
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. There is a small bit of javascript which, when the 'onChange' event occurs, triggers a 'submit' which reloads the page and displays the stored values for that session using a session ID variable named, '$existingSessions'. Even though the form's...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
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...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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();...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.