/    Sign up×
Community /Pin to ProfileBookmark

innerText will not accept "…"

Have a look at this simple piece of code and tell me what’s wrong…..please!

Before I hang myself.

[CODE]
<html>
<head>
<title>Secure Form</title>
<script language=”javascript”>
var idx=0;
function showDots(){
idx++;
switch(idx){
case 1:
document.getElementById(“D1″).innerText=”.”;
break;
case 2:
document.getElementById(“D1″).innerText=”..”;
break;
case 3:
document.getElementById(“D1″).innerText=”…”;
break;
case 4:
idx=0;
document.getElementById(“D1″).innerText=””;
break;
}
setInterval(“showDots()”, “1000”);
}
</script>
</head>
<body bgcolor=”navy” text=”white” onload=”showDots()”>
<br>
<center>
please wait…
<br>
processing<div id=”D1″>&nbsp;</div>
</body>
</html>

[/CODE]

the code is not really important, I was just wanting a visible processing script

thanks guys.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@CrazyMerlinauthorJan 04.2006 — Ignore -- Fixed It!
Copy linkTweet thisAlerts:
@KorJan 04.2006 — use at least [B]innerHTML[/B] instead of [B]innerText[/B] (innerText is IE only, while innerHTML, even a non-standard method, it is recognized by all the modern browsers.
×

Success!

Help @CrazyMerlin 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.1,
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,
)...