>Most objects (as e. g. Images) can by created with javascript using the
>function "new". Is the opposite also available (destroy)? I'd like to
>display some pictures on my page with buttons beside them - the user then
>can destroy the pictures he don't like by clicking on the button beside
>(it's for a little game).
>
>Any ideas?
It doesn't quite work like that, new doesn't really create a new
image, in the sense that it is displayed onscreen.
To destroy an image you have a couple of options, depending on whether
you want it to work in NN3. - then you could change the image from the
one they've clicked on, to a blank image - that would be simple and
looking up image swaps at
http://www.squeaky.demon.co.uk/jn/
will find you all the code to do that.
The other option is to use DHTML and to genuinely hide the image, that
runs you into cross browser problems. but still is simple to do and
look at changing visibility at the same site.
Jim.
Do you know where I could find an example. I'd prefere the second solution,
it's better for my purpuses when the image is "deleted" completly so the
page gets smaller.
Marco
--
Martin Honnen