This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 05 Apr 2006 02:51:51 pm    Post subject:

why doesn't this work?

<head>
<script language="JavaScript">
function background( ){

setTimeout(document.bgcolor = "red",5000);
}
</script>

</head>

<body>

<form>
<input type="button" VALUE="Start" OnClick="background( )">
</form>
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 05 Apr 2006 03:06:04 pm    Post subject:

WORKS wrote:
<head>
<script language="JavaScript">
function background(){
setTimeout( "document.bgColor = 'black';", 5000 );
}
</script>

</head>

<body>

<form>
<input type="button" VALUE="Start" onClick="background()">
</form>


You have to put the code you want to run after the timer expires in a string and the background color property is bgColor not bgcolor, case sensitive.


Last edited by Guest on 05 Apr 2006 03:07:43 pm; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 05 Apr 2006 03:08:57 pm    Post subject:

Thanks. I see I left out quotes and a semicoln.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 05 Apr 2006 03:15:52 pm    Post subject:

Don't forget that you forgot to type a capital C for bgColor, a lower case c won't work.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 05 Apr 2006 03:19:34 pm    Post subject:

Oh I see forgot about that.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement