Philip,
Try the following......
document.body.background = 'image.jpg'
The will change the background property within your <body> tag. It will NOT
change a BODY style sheet background-image attribute because of the url
attribute I presume. If you want to see the attribute from a style sheet
you can give the body tag an ID and reference it by
document.all.IDname.style.backgroundImage (in IE only) but you can not
modify it.
Hope this helps.
Mark.
----- Original Message -----
From: Philip Arnold - ASP <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 30, 2000 10:31 AM
Subject: OT: JavaScript background image question
> I know this isn't a CF question, but it's for one of our CF sites...
>
> Am I going daft, or is there no JavaScript way of changing the background
> image of a page - there seems to be controls for just about everything
else,
> but I can't find anything for changing the background image (the
Background
> attribute for the Body tag)
>
> The docs in Studio claim that there's a "background" property for the
body,
> but I've tried changing it with document.background, but it has no visual
> effect.
> It states that "It is possible to change a documents background by
> manipulation of the background property.", but no matter what I try, it
does
> nothing.
>
> If I do an alert() before and after the command, it states that it's
> changed, but nothing happens to the browser.
>
> Any suggestions would be appreciated.
>
> BTW, I've already searched through all of the documentation I have, and
> multiple resource sites, none seem to mention it...
>
> Philip Arnold
> ASP Multimedia Limited
> T: +44 (0)20 8680 1133
>
> "Websites for the real world"
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> **********************************************************************
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.