On Mon, Aug 18, 2008 at 07:58:13PM +0200, Satyam wrote:
> You don't need to create a new img element to be able to show a
> different picture, you can just change the src attribute of the existing
> img to the new image file and it will do just the same. If the new image
> is of different size as the original one and the original didn't have
> width and height settings, it will expand or contract to fit. It it had
> width or height, you can also change them just as you did with the src.
> Also, the DOM (not YUI's Dom utility but the w3c DOM object) has
> removeChild. It is not worth it to create an instance of Element just
> for one operation, just use the plain DOM one.
> book is small because the language is short,learning to use the ANSI C
> library is another matter altogether. At first, you don't know what
> the DOM, which is the programming interface to the web page, is the hard
> part. YUI simplifies part of it, parts are so easy (like removeChild)
> that it is not worth it to trouble yourself with the YUI at all. You'll
> find your way.
Thank you, Satyam.
Once again you have helped me with one more step into this wierd world
of client-side web programming.