Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > dhtml problem in safari

Reply
Thread Tools

dhtml problem in safari

 
 
Patrice
Guest
Posts: n/a
 
      02-18-2005
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


 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      02-18-2005
"Patrice" <(E-Mail Removed)> wrote in message
news:e4dRd.13486$(E-Mail Removed).. .
: 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Konqueror/Safari problem: DHTML-generated links and frames gubusoft@gubusoft.com Javascript 1 09-26-2006 09:04 PM
Do any DHTML books cover contemporary DHTML? Steve Javascript 1 04-09-2005 04:16 PM
A DHTML Problem !! MingChih Tsai ASP .Net 2 03-17-2005 03:43 PM
Problem with Firefox and a dhtml-menu AS Firefox 0 10-20-2004 08:41 AM
DHTML Problem with DIV and OnMouseOver John Smith HTML 5 12-18-2003 09:38 PM



Advertisments