Discussion Locked

Hidding in HTML

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a way to hide something using HTML or other means in a webpage.

I want to put free web tracking in my page and same time hide it. Is this possible.

3 replies

by ed woychowsky

contained in the span tags incase it is needed later before erasing it, which is performed by the JavaScript function hideStuff. The function show stuff copies the original HTML from the hidden text box and restores it. Hope this helps.

function hideStuff() {
document.all.hdnHTML.value = document.all.spanToHide.innerHTML;
document.all.spanToHide.innerHTML = ??;
}

function showStuff() {
document.all.spanToHide.innerHTML = document.all.hdnHTML.value;
}

by jay eckles

Use cascading style sheets. Give the element you want to hide an id attribute, then use that id to reference the element in Javascript. Use Javascript to set the element's hidden and visible attributes. This will properly hide the element.

by dahlbyk

Just put style="display: none" in the containing block's tag. If this doesn't work, please post the code you need to hide. You shouldn't need Javascript to hide it.
Cheers ~ K

This discussion is closed to new replies.