On 25 Jan 2004 09:19:10 GMT, techy techno <an**********@hotmail.com> wrote:
I just need the JS for hiding the TEXT
ITs not a banner its just a <h1> link to their site and If the js is
disabled then thats my hardluck :
so please can you give me the required JS.
Use CSS instead. It has more chance of being supported, too.
If the inserted HTML has a specific pattern, you can match that with CSS
selectors. For example:
<style type="text/css">
h1 a {
display: none;
}
</style>
</head>
<body>
...
<h1><a href="...">The advert text</a></h1>
The CSS rule above will cause all links within a H1 element to be hidden.
They'll still exist in the page, but the user won't see them. Of course,
this means that you cannot use a similar sequence yourself. However, you
needed to, the above example could be modified to:
<style type="text/css">
h1 a {
display: none;
}
h1.showThis a {
display: inline;
}
</style>
</head>
<body>
...
<h1><a href="...">The advert text</a></h1>
...
<h1 class="showThis"><a href="...">My own link</a></h1>
The use of a more specific selector, acheived through the use of a class,
takes precedence, so the second link is displayed, whilst the first is
hidden.
If this is to hide banner images or text inserted by a host, be warned
that hiding that content probably violates the Terms and Conditions of
that site and can lead to the termination of your account.
Mike
--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)