/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] SitePoint Member

this code work is IE6+7 but not in FF- please help

the code:

<script type=”text/javascript”>
function ShowImage(page, tag)
{
var i = 1;
var el;
while (el = document.getElementById(“image” + i)) {
if (i == page)

el.style.display = ”;

else
el.style.display = ‘none’;
i++;
}
}
</script>

THEASE ARE THE ONCLICK

<div class=”poets-box-bg float-right”>
<div onclick=”ShowImage(parseInt(this.value), ‘image’);” value=”1″>
<img src=”images/poets/&#1488;&#1497;&#1497;&#1502;&#1503; &#1488;&#1490;&#1489;&#1512;&#1497;&#1497;&#1492;.jpg” width=”100″ height=”100″ alt=”” />
</div>
<div onclick=”ShowImage(parseInt(this.value), ‘image’);” value=”2″>
<img src=”images/poets/&#1488;&#1512;&#1494;_&#1489;&#1497;&#1496;&#1493;&#1503;.jpg” width=”100″ height=”100″ alt=”” />
</div>
</div>

THEASE ARE THE IMAGE THAT SOULD SHOUW

<div style=”display:none” id=”image1″ >
<img src=”images/poets/&#1488;&#1497;&#1497;&#1502;&#1503; &#1488;&#1490;&#1489;&#1512;&#1497;&#1497;&#1492;.jpg” width=”100″ height=”100″ alt=”” /><br />
sdfasdfsadfasgasdgas
</div>
<div style=”display:none” id=”image2″ >
<img src=”images/poets/&#1488;&#1512;&#1494;_&#1489;&#1497;&#1496;&#1493;&#1503;.jpg” width=”100″ height=”100″ alt=”” /><br />
sdfgdfgdfgdf gf dfg
</div>

THANKs

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJun 14.2008 — div does not have attribute value, it's invalid.
Copy linkTweet thisAlerts:
@shmar77authorJun 14.2008 — ? I just relized that and changed the DIV to LI

thanks
×

Success!

Help @shmar77 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.19,
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,
)...