|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
Can anyone tell me why this Javascript line is causing an error. I think it is the hyphen between background and color. If it is how do I work with that? Code:
document.getElementById('sign').style.background-color="White";
__________________
Best Regards, Randy |
|
|||
|
Apparently the hyphen does cause an error with javascript when used that way. A solution is to change "background-color" to "backgroungColor".
Code:
document.getElementById('sign').style.backgroundColor= "white" ;
Thanks for the input wige as it led me in a good direction.
__________________
Best Regards, Randy |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AJAX and javascript calling javascript | krnl | Web Programming Discussion Forum | 14 | 11-18-2007 11:00 AM |
| Javascript Error | Evic | WebProWorld: Guidelines/Announcements/Suggestions | 3 | 08-09-2005 11:36 AM |
| Runtime Error - Line 1 - Error Syntex Error | charms987 | Graphics & Design Discussion Forum | 6 | 07-29-2005 12:56 PM |
| Javascript form calculation error | twopooches | Web Programming Discussion Forum | 1 | 02-13-2005 11:44 PM |
| Two browsers, one javascript error | mikmik | Web Programming Discussion Forum | 4 | 03-15-2004 09:53 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |