Click to See Complete Forum and Search --> : HTML Browse


ttohme
09-03-2004, 07:52 PM
Hi guys,

I am trying to build a page where people can browse by images either by year or category, can anyone give me a sample on how to build a page so it would order my images eith by date or category?

Thanks in advance

PeOfEo
09-03-2004, 08:44 PM
You cant with html. You need a server side language to either put the images into a data base with the categoy and retrieve them, alter the file name or save them into a directory for that categoy then retrieve them from those folders, with asp it would use a file system object. What server side languages do you have available. There are plenty of premade gallery scripts that you might take a look at. Your options are asp, asp.net, php, cgi, jsp, or cold fusion.

Stephen Philbin
09-03-2004, 09:37 PM
By the way. Don't be put off by the somewhat technical sounding advice PeoFeo has given you. I will make perfect sense if you spend a little while looking into it. Peo can give you plenty of advice (far more than you're likely to need in fact) for ASP. The two most common ways I should think will be ASP (that's Peo's world of which I know nothing, or you could use PHP (which I myself am learning).

I'll just give you a little over view of why you need a "server side language" rather than plain html:

The basic and most common use of "server side scripting" is to basically make the page on the server first (depending on what the users has asked for) and then send it to the user as plain html.

Bear with me here, it really is quite simple.

We'll just do with list alphabetically or by date for the sake of simplicity.

Say you have a list of cars that a car manufacturer has made. You put all the cars and their names in a database (which is also very easy and quite simple with the right help. Such help can be found here). Now in the databse you have has the cars name in one field and the date it was made in another.

The way the server side thing works is that you use the server side language to make some instructions that read what the user wants, by date or by name. Then the "server side script" takes what the user asked for (in this case we'll use date) and it calls all entries (each entry being all the data about a certain car) and then orders them in order by what is in the date filed of each entry in the database.

After the server has grabbed all the info in the right order then it just pops it into some html and sends it off to the user. The laguages you need to learn to do this can seem complicated at first. But don't think of them as complicated or something that is in any way incomprehensible. Just look at them logically and it'll make perfect sense before you know it. Most of it is pretty plain english too so don't worry about having to understand a bunch od zero's one's and other assorted random characters.

Just give it a whirl and you'll be amazed at what you can do, yet were probably convinced you couldn't. ;)

PeOfEo
09-04-2004, 02:25 AM
Here is how server side scripts work. You create a document with a format like .aspx, .php, .asp, .jsp whatever, and then the server sees that as a document with a script that it needs to run. The server executes the scipt that may ask for it to go into a data base and get records, run an application, so on and so fourth. Then it will take data it retrieved from a db, info it got from the user via a form, so on and so fourth and populate the html. Data base records are written out as html, directory contents written out as html. Passwords checked, form entries added to the data base, application data retrieved. That is how it all works in a nut shell. This is far more powerful then any client side scripting because client side means it runs on the client and that it cannot see the server or do stuff with it (the server cannot do the same with the client for that matter, you cant make a popup menu from the server without writing out java script from the server), because the slient cannot see the script in the source code server side scripting is also neccessary for security.

PS: I do not use asp, I use asp.net, both microsoft, but they are completely different technologies ;)