Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] CSS in JS function - where is the error?


  • From: javascript@xxxxxxxxxx (Hassan Schroeder)
  • Subject: [Javascript] CSS in JS function - where is the error?
  • Date: Tue, 28 Jan 2003 10:36:14 -0800

Andrzej Wroblewski wrote:

> Look at this function and tell me what is wrong:

> document.write('<div style="position:absolute; left:"+banerleft+";">');

Mismatched single and double quotes - you want the variable outside
the single quotes of your document write string, like so:

document.write('<div style="position:absolute; left:'+banerleft+';">');

HTH!
-- 
Hassan Schroeder ----------------------------- hassan@xxxxxxxxxxxxxx
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.