[Javascript] Only visible in Internet Explorer

BEKIM BACAJ trojani2000 at hotmail.com
Wed Oct 23 09:45:05 CDT 2002


There are several ways to hide an element in any browser, but diifferent 
browsers got different syntax to hide or view elements, so this way you 
could go crazy determining and telling to the specific browser how to hide 
an element 'if this=that', but if we presume that you're question is 
standing up-side-down, the solution to the problem becomes very simple:

....somewhere in the body....
<DIV ID="favorite"></DIV>
...can add some explicit style and position to this div in 
<STYLE></STYLE>....
<script>
function functionName(){
                      if(document.all){
   favorite.innerHTML=//be sure that following string kept in one line!
'<a 
href="javascript:window.external.AddFavorite(\'http://www.urlgoeshere.com\',\'Example 
bookmark link\')">Bookmark</a>'
                     }
                                  }
functionName()
</script>
This way, only the IE versions of Browsers will show the "Bookmark" link.

Regards
-------------------------------------------------------
>From: ws <ws at chello.se>
>Reply-To: javascript at LaTech.edu
>To: javascript at latech.edu
>Subject: [Javascript] Only visible in Internet Explorer
>Date: Mon, 21 Oct 2002 15:53:37 +0200
>
>Hi there,
>
>How do I make the link "invisible" in other browsers than Internet 
>Explorer?
>
><a 
>href="javascript:window.external.AddFavorite('http://www.urlgoeshere.com',
>'Example bookmark link')">
>Bookmark</a>
>
>Regards,
>Lars Johansson
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Javascript mailing list