/    Sign up×
Community /Pin to ProfileBookmark

Contractable Header

I did a few searches and looked for threads about this but I didn’t find any relevant..So I apologize if I missed one….

This isn’t my script..but we use it on my clan’s website and I just noticed that this works in IE and Opera, however it will not work on Firefox.

[CODE]/*Contractable Headers script- By Website Abstraction (www.wsabstract.com) Over 200+ free JavaScripts here! */
/* added to the site: 1.6.05 */

var head = “display:show”;
function doit(header) {
var head = header.style;
if (head.display == “none”) {
head.display = “”;
} else {
head.display = “none”;
}
}[/CODE]

The problem is ” var head = header.style; “…Using Firebug, I get the message that the header has no properties.

I would like to fix this so that it will work with Firefox as well as IE…or at least just Firefox. If anyone could help me I’d appreciate it greatly.

I am a big noob with JS..I won’t lie. JS isn’t my thing…but if you guys can help, I thank you.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@PadonakApr 28.2007 — Firebug says so because variable [b]header[/b] is not defined. what is mentioned by "header" in this script?? and what does " style.display = "" ' mean? display must be defined.
×

Success!

Help @Parag0n spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...