View Profile
 

programming, design and blahblah

20041105

Need for sequence generation

I initially needed a tool to generate an HTML page to display images (image01.jpg, image02.jpg.... image56.jpg). I couldn't have just used a javascript loop because I wanted to put different captions under some images. a javacript function that takes the image number as parameter would've worked, except I wasn't sure all the people who would browse the page would have JS enabled(I know I don't). so I wrote SequenceGen to help me generate a static HTML template that contains all the image links.

the tool is useful for generating program code and scripts ("why not just create the loop inside the program I'm writing?" you might ask. well, sometimes you'll find you can't. I'm not going to explain why here.) it can also generate table templates of this sort:

-

AA

AB

AC

BA

BB...

009

-

-

-

-

-

010

-

-

-

-

-

011

-

-

-

-

-

"I can just use XSL" you might say. well, good luck when you try to generate URLs for the HREF attribute inside of links.

there are limitations as to what the program can do. such as a sequence variable cannot be used to define the sequence range of a nested sequence block (bravo if you understood what the previous sentence means). nor is it capable of excluding a range of values or supporting conditional outputs. but I'll keep them in mind for future releases.

3 Comments:

Blogger royassaly said...

99% of people have JavaScript enabled. No need to worry about that.

As for creating images from loops, I played around with that stuff about 5 years ago. Go here for some samples:

http://members.rogers.com/sometimesboredinottawa/experimental/thelab.html

Basically, I had images of 1x1 pixels of 10 different colours whose file names are 1.jpg, 2.jpg...10.jpg.

Let the loops commense!

1:16 AM  
Blogger .e said...

whoa, man. hold the salt! I'll just have my coffee black, thank you. :)

In the example, I was talking about making an HTML photo ablum with placeholders for captions below the thumbnails. Your html image bitmapping blew past my seqgen like a jet plane past midget walking backwards... you're waaaay ahead of me. just try the program out and you'll know what I'm talking about.

... think simple.

1:21 AM  
Blogger royassaly said...

ok :-P

10:56 PM  

Post a Comment

<< Home