SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: Heeeeelp!!!!

  1. #1
    Spam Can Kill!!! Disk-t's Avatar
    Join Date
    Jul 2001
    Location
    n/a
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Heeeeelp!!!!

    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>

  2. #2
    SitePoint Zealot Marek Bereza's Avatar
    Join Date
    Sep 2001
    Location
    London
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 /"
    of the brethren of disco metal
    Disco metal tunes at www.wikid.co.uk

  3. #3
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The format for the setTimeout should be:
    setTimeout("function",milliseconds)

    So you could try this:
    setTimeout("this.innerText='dv'",5000)

  4. #4
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    innerText? I thought it was innerHTML?

  5. #5
    SitePoint Zealot Marek Bereza's Avatar
    Join Date
    Sep 2001
    Location
    London
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    setTimeout("this.innerText='dv'",5000)
    Yeah thats what I meant.
    of the brethren of disco metal
    Disco metal tunes at www.wikid.co.uk

  6. #6
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
    Where the World Once Stood
    the blades of grass
    cut me still

  7. #7
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dhtmlgod: there is innerText, innerHTML, outerText, outerHTML.
    Not forgetting: object.insertAdjacentText, object.insertAdjacentHTML and object.createTextNode()
    Cheers,

    Keith


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •