Results 1 to 4 of 4

Thread: for-next looping..

  1. #1
    gencoglu
    Guest

    Cool for-next looping..

    hello there,
    I learned to print 10 images on the screen using FOR LOOPING.
    (for x=0;x<10;x++);

    document.write('some.jpg')

    this prints ten images side by side..
    But What Iwant to do is clear all those 10 images one by one usin FOR looping...I think I need a setTime and how about FOR looping ...If I use /x-- /it doesnt work..please tell me how to reduce numbers f images...Thanks

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Code:
    for (x = 10; x > 0; x--);
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    You can't unload images in the same way because they are already written to the page.
    The easiest thing to do is to swap each image for a blank one.

    Here's an example I just wrote. It loads a set of blank images, then one by one loads a new image and then reloads the blank one again.
    Mark
    -------------------

  4. #4
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    You could put those images in ten (or one) block level elements (div), then set the visibility to none or hidden.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width