Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Only visible in Internet Explorer


  • From: javascript@xxxxxxxxxx (BEKIM BACAJ)
  • Subject: [Javascript] Only visible in Internet Explorer
  • Date: Wed, 23 Oct 2002 14:45:05 +0000

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@xxxxxxxxx>
>Reply-To: javascript@xxxxxxxxxx
>To: javascript@xxxxxxxxxx
>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@xxxxxxxxxx
>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