SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy setTimeout help (annoyed)

    setTimeout is causing me grief. The damn syntax is playing tricks on me. Whats wrong with the following:

    Code:
    <img src="images/trans.gif" onload="setTimeout("doCalc('re_val*313')", 313);">
    Thanks!

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't have double quotation marks within an attribute value that is itself enclosed in double quotation marks.
    Code:
    <img src="images/trans.gif" onload="setTimeout('doCalc(\'re_val*313\')', 313)">
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    You can't have double quotation marks within an attribute value that is itself enclosed in double quotation marks.
    Code:
    <img src="images/trans.gif" onload="setTimeout('doCalc(\'re_val*313\')', 313)">
    Hmm, I knew it would be something dumb like that. Thanks a bunch


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
  •