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.
- References:
- [Javascript] CSS in JS function - where is the error?
- From: Andrzej Wroblewski
- [Javascript] CSS in JS function - where is the error?
- Prev by Date: [Javascript] CSS in JS function - where is the error?
- Next by Date: [Javascript] Re: form validation
- Previous by thread: [Javascript] CSS in JS function - where is the error?
- Next by thread: [Javascript] Re: form validation
- Index(es):