Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > changing the barckground image

Reply
Thread Tools

changing the barckground image

 
 
Jean Pierre Daviau
Guest
Posts: n/a
 
      03-02-2006
Hi ,
a simple one,

document.body.background = document.getElementById('item').value

document.getElementById('item').value (an input text) return
the right value for the image.
Why the background is not changed?

Thanks for your attention.

Jean Pierre Daviau
--
Easyphp1.8
Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
http://www.jeanpierredaviau.com


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      03-02-2006
Jean Pierre Daviau wrote on 02 mrt 2006 in comp.lang.javascript:
> Hi ,


>Re: changing


NEVER start a new thread with "Re:"

> a simple one,


A simple what?

> document.body.background = document.getElementById('item').value


This is the code for an Image:

document.body.style.backgroundImage = url("....")

> document.getElementById('item').value (an input text)


A background image must be an image (.jpg, .gif, .bmp, etc)

> return the right value for the image.


Do not understand.

> Why the background is not changed?


That's why.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Jean Pierre Daviau
Guest
Posts: n/a
 
      03-02-2006
Sorry I found it was because the event was in a form submit event.
The page was reloading.


"Jean Pierre Daviau" <(E-Mail Removed)> a écrit dans le message de news:
NvCNf.32$W%(E-Mail Removed)...
> Hi ,
> a simple one,
>
> document.body.background = document.getElementById('item').value
>
> document.getElementById('item').value (an input text) return
> the right value for the image.
> Why the background is not changed?
>
> Thanks for your attention.
>
> Jean Pierre Daviau
> --
> Easyphp1.8
> Apache1.3.24
> DEVC++, borland 5.5
> windows Xp
> asus p4 s533/333/133
> Intel(R) Celeron (R) CPU 2.00 GHz
> http://www.jeanpierredaviau.com
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing style of the numbers in a CSS <ol> without changing the style of the <li> Aaron Beall HTML 2 09-14-2007 08:07 PM
<FAQENTRY>I'm changing my page but nothing is changing on the screen. Why?</FAQENTRY> VK Javascript 3 03-15-2007 04:59 PM
changing file extension without changing filename jamy Computer Support 4 03-04-2005 01:03 AM
wx.Image: Couldn't add an image to the image list. Laszlo Zsolt Nagy Python 1 01-26-2005 09:55 PM
Difficulty in changing the Connection Server control path changing ... Samridhi Kumar Shukla ASP .Net 1 11-30-2003 02:31 AM



Advertisments