|
-
July 28th, 2005, 08:45 AM
#4
Re: Disabling menu link
In my example above, you replace
Code:
function disable_link()
{
document.getElementById("link1").innerHTML="<a disabled><u>It's useless to click on this cool link</u></a>";
}
by
Code:
function disable_link()
{
document.getElementById("link1").innerHTML="";
}
The principle is that I use a "span" thing (I'm not sure if it is a true "object" or not), named "link1" in my example.
Then I can put everything I want into that span thing, such as a href link, or nothing, with the "innerHTML" or "innerText" property.
The span thing is very useful. It is similar to the "div" thing, except that "div" always takes at least an entire line, whereas the span thing has the width of the things it contains.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|