/    Sign up×
Community /Pin to ProfileBookmark

Firefox doesn’t display box

Hi,
I am having a problem displaying this box, I must have looked at the code, 10 times and just can’t figure it out. it looks fine in IE, but Firefox it just doesn’t show when the page loads. here’s the code:-

[QUOTE]

<ul style=”margin-top:0px;”>
<li style=”display:inline”><a id=”label2″ style=”text-decoration:none” href=”javascript:showconcept(‘label2′,’project1’);”>MyCitysMall.com
– Find a store</a>&nbsp;|</li>
<li style=”display:inline”><a id=”label4″ href=”javascript:showconcept(‘label4′,’project2’);”>MyCitysMall.com
– Storefront</a></li>
</ul>

[/QUOTE]

[QUOTE]<script language=”JavaScript”>

var last = “project1”;
var lastlbl = “label2”

function hidelast() {
var obj = new getObj(last);
obj.style.visiblity = “hidden”;
obj.style.display = “none”;

var obj = new getObj(lastlbl);
obj.style.textDecoration = “underline”;
}

function showconcept(slabel,model) {
hidelast();

var obj = new getObj(model);
obj.style.visibility=”visible”;
obj.style.display = “block”;

last = model;

var obj = new getObj(slabel);
obj.style.textDecoration = “none”;

lastlbl = slabel;

}
</script>[/QUOTE]

can someone help out
[url]http://www.novatexsolutions.com/projectsinmotion.php[/url]

I am not very proficient in javascript so please go easy on me.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@JoeyGAug 16.2005 — You need to provide more information. For example, what is getObj()?

Assuming I'm being stupid, and getObj() is a standard Javascript function, this may work better:

<i>
</i>var last = "project1";
var lastlbl = "label2"

function hidelast() {
var obj = new getObj(last);
obj.style.visiblity = "hidden";
obj.style.display = "none";

<i> </i>var obj = new getObj(lastlbl);
<i> </i>obj.style.textDecoration = "underline";
}

function showconcept(slabel, model) {
last = model;
lastlbl = slabel;
hidelast();

<i> </i>var obj = document.createTextNode(model);
<i> </i> obj.style.visibility="visible";
<i> </i> obj.style.display = "block";
<i> </i> document.body.appendChild( obj)

<i> </i>var obj = document.createTextNode(slabel);
<i> </i> obj.style.textDecoration = "none";
<i> </i> document.body.appendChild( obj)
}


Specifically, note this use of createTextNode() in place of getObj().

Also, this may not work in Idiot Exploiter, and I refuse to hack my code to fix that. Sorry.
Copy linkTweet thisAlerts:
@rfahmyauthorAug 17.2005 — No that doesn't even let it work in IE... I will try again.
×

Success!

Help @rfahmy 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...