Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-14-2003, 07:36 PM   PM User | #1
Garadon
Regular Coder

 
Join Date: Jul 2002
Posts: 698
Thanks: 0
Thanked 0 Times in 0 Posts
Garadon is an unknown quantity at this point
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
Garadon is offline   Reply With Quote
Old 04-15-2003, 04:12 PM   PM User | #2
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
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”
beetle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:55 PM.


Advertisement
Log in to turn off these ads.