Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: imageList

  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    imageList

    I made this imageList, that hold images as the name says lol

    the Script file
    Example of it in use

    hope its usefull for some one

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Pretty neat, but typically in a nicely scripted API like this, there's a mechanism for writing HTML to the page, whether via document.write or other.

    Wouldn't it be much nicer to see code that looked like this?
    Code:
    var images=new imageListInitalize(); 
    
    images.Add('cards/1.jpg');
    images.Add('cards/2.jpg');
    images.Add('cards/3.jpg');		
    images.writeAll();
    
    images.Delete(1);
    images.writeAll();
    
    images.Insert(1,"cards/4.jpg");
    images.writeAll();
    
    images.Update(0,"cards/7.jpg");
    images.writeAll();	
    
    images.Clear();
    images.Add('cards/1.jpg');
    images.writeAll();
    The writeAll() method would be easy to make. You could also provide DOM-based options for post-load appending, or a method-or two for writing single images or images in a specified pattern or to a certian limit.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

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