dhtml problem in safari

P

Patrice

Hi,
This code works with ie but not with safari:


function montre(id,this_nb,nb,shtml) {
if (document.getElementById) {
document.getElementById(id).style.visibility = 'visible';
} else if (document.all) {
document.all[id].style.visibility = 'visible';
} else if (document.layers) {
document.layers[id].visibility = 'visible';

};

var el = (document.getElementById)? document.getElementById(id):
(document.all)? document.all[id]: (document.layers)? document.layers[id]:
null;
if (!el) return;
if (typeof el.innerHTML!="undefined") {
el.innerHTML = shtml;
} else if (document.layers) {
el.document.write(shtml);
el.document.close();
}

}

Can someone tells me what to do to make it workm on both browsers?
Thx.
Pat
 
R

Roland Hall

: Hi,
: This code works with ie but not with safari:
:
:
: function montre(id,this_nb,nb,shtml) {
: if (document.getElementById) {
: document.getElementById(id).style.visibility = 'visible';
: } else if (document.all) {
: document.all[id].style.visibility = 'visible';
: } else if (document.layers) {
: document.layers[id].visibility = 'visible';
:
: };
:
: var el = (document.getElementById)? document.getElementById(id):
: (document.all)? document.all[id]: (document.layers)? document.layers[id]:
: null;
: if (!el) return;
: if (typeof el.innerHTML!="undefined") {
: el.innerHTML = shtml;
: } else if (document.layers) {
: el.document.write(shtml);
: el.document.close();
: }
:
: }
:
: Can someone tells me what to do to make it workm on both browsers?

Perhaps in a DHTML or client-side j(ava)script NG, preferably with Safari
support. This is ASP related (server-side scripting) at a Safari competitor
newsserver.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top