You know how there is a "" and then there is a '', well what comes after that? For example, what do I put around "dv"?
<a onClick="setTimeout(5000,'this.innerText=dv')">fggfg</a>
| SitePoint Sponsor |
You know how there is a "" and then there is a '', well what comes after that? For example, what do I put around "dv"?
<a onClick="setTimeout(5000,'this.innerText=dv')">fggfg</a>

I thought in setTimeout you do the code followed by the milliseconds :
<a onClick="setTimeout(5000,'this.innerText=dv')">fggfg</a>
Also I don't know about the "" and the'' but I think you do something like /"


The format for the setTimeout should be:
setTimeout("function",milliseconds)
So you could try this:
setTimeout("this.innerText='dv'",5000)

innerText? I thought it was innerHTML?![]()

Yeah thats what I meant.setTimeout("this.innerText='dv'",5000)![]()




Hi all,
if 'dv' is a variable, it should be:
setTimeout("this.innerText=" + dv,5000)
otherwise, the text will read 'dv' and not what dv stands for (contains).
dhtmlgod: there is innerText, innerHTML, outerText, outerHTML.
Vinny
moderator at:Webxpertz Forums
Not forgetting: object.insertAdjacentText, object.insertAdjacentHTML and object.createTextNode()dhtmlgod: there is innerText, innerHTML, outerText, outerHTML.
![]()
Cheers,
Keith
Bookmarks