/    Sign up×
Community /Pin to ProfileBookmark

wat is wrong with my javascript function?

Orginal sample: [url]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/filters/fade.asp[/url]

[CODE]<html>
<body>
<BUTTON onclick=”fnToggle(‘oTransContainer’,’oDIV1′,’oDIV2′)”>Toggle Transition</BUTTON>
<table>
<tr>
<td STYLE=”width: 57px;height:17px;”>
<DIV ID=”oTransContainer” STYLE=”position:absolute;width: 57px;height:17px; filter:progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=0.0) “>
<DIV ID=”oDIV1″ STYLE=”position:absolute;width:57px; height:17px;background:gold”> DIV #1</DIV>
<DIV ID=”oDIV2″ STYLE=”visibility:hidden;position:absolute;width:57px; height:17px; background: yellowgreen; “>DIV #2</DIV>
</DIV>
</td>
<td STYLE=”width: 57px;height:17px;”>
<DIV ID=”DIV1″ STYLE=”position:absolute;width: 57px;height:17px; filter:progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=0.0) “>
<DIV ID=”DIV2″ STYLE=”position:absolute;width:57px; height:17px;background:gold”> DIV #1</DIV>
<DIV ID=”DIV3″ STYLE=”visibility:hidden;position:absolute;width:57px; height:17px; background: yellowgreen; “>DIV #2</DIV>
</DIV>
</td>
</tr>
</table>
</body>
</html>

<SCRIPT>
var bTranState = 0;
function fnToggle(PMTCont,PMD1,PMD2) {
PMTCont.filters[0].Apply();
if (bTranState==’0′) {
bTranState = 1;
PMD2.style.visibility=”visible”;
PMD1.style.visibility=”hidden”;}
else {
bTranState = 0;
PMD2.style.visibility=”hidden”;
PMD1.style.visibility=”visible”;}
PMTCont.filters[0].Play();}
</SCRIPT>[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @stephenvs 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

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