-
05-03-2011, 12:07 PM #1
Banned
- Join Date
- Feb 2011
- Posts
- 218
CSS image gallery
I'm hoping to get a little direction here: I'm trying to create a simple image gallery such as the one linked here with thumbs on the left and a "stage" at right to display corresponding full-size images upon clicking. This example, however, uses a simple JavaScript to generate thumbs from the large images, whereas I would like to create my own thumbs and also include a descriptive caption for each full-size image.
The site linked here-- a modification of the former example-- is closer to what I'm after, but I'd like to be able to format the caption text, which isn't possible here given that the script is pulling the text from the "title" attribute.
In essence, I'd like to create a gallery without resorting to frames, and with minimal scripting-- and maximum CSS-efficiency-- that displays full-size images by clicking the thumbs-- i.e. not via rollover-- and that reveals a corresponding caption on the "stage" under the large image. I would imagine the simple script in the above examples could be modified to allow for a formatted caption, but my JS knowledge is minimal at best.
Thanks much for any help here.
-
06-11-2011, 10:47 AM #2
What language are you going to program this in? PHP? or ?
You can't do this all in javascript. You're going to need a server-side scripting language. I'd recommend using PHP.
-
06-13-2011, 04:25 PM #3
Fixer Upper
- Join Date
- Jun 2011
- Posts
- 29
You can do this in javascript you don't need anything server side look into galleria or if you want to design it yourself look into the jquery library it has a lot of functions you can use for this.
You can use PHP if you want to store the captions in a database but for a simple gallery that doesn't need a backend javascript will do just fine.Real Estate Portal Software - Fully Featured Real Estate Portal Software for Newspaper's, Real Estate Agents, & Entrepreneurs
-
06-13-2011, 05:09 PM #4
Huh? Javascript is client-side scripting language. If you're going to have an image gallery, the images are stored on the server. You can't store images on the client side. Thus, how do you get to the images on the server using Javascript?
James will need a server-side scripting language in some form, for an image gallery. Whether he writes one himself or installs a pre-made app, it will have a server-side scripting language and most likely a database on the back end. You can't do this with just Javascript.
-
06-13-2011, 06:13 PM #5
Fixer Upper
- Join Date
- Jun 2011
- Posts
- 29
No. Just do a google search for javascript image gallery there are a ton of them that require no server side code. Like I said he can use PHP or another server side code but he does not need to I have done this many times.
If this is not possible please explain the galleria Javascript image gallery to me, as well as the others.
Javascript can do this easily especially if using Jquery or MooTools.Real Estate Portal Software - Fully Featured Real Estate Portal Software for Newspaper's, Real Estate Agents, & Entrepreneurs
-
06-13-2011, 06:25 PM #6
Fixer Upper
- Join Date
- Jun 2011
- Posts
- 29
You are incorrect in saying javascript is client side. javascript can be used both client-side and server-side using it server side will give you access to server resources like photos. Client and server javascript are both extensions of the javascript core.
Real Estate Portal Software - Fully Featured Real Estate Portal Software for Newspaper's, Real Estate Agents, & Entrepreneurs
-
06-13-2011, 09:38 PM #7
>javascript can be used both client-side and server-side
Ha ha dude, you are way too funny...you have a great sense of humor...for a minute there I thought you were serious.
-
06-14-2011, 08:26 AM #8
Fixer Upper
- Join Date
- Jun 2011
- Posts
- 29
Server-side JavaScript - Wikipedia, the free encyclopedia
Dam dude look into stuff before you go around boasting your ignorance. But by all means tell me Wikipedia is wrong too.Real Estate Portal Software - Fully Featured Real Estate Portal Software for Newspaper's, Real Estate Agents, & Entrepreneurs
-
06-14-2011, 09:38 AM #9
It does look like you are correct BlueSoft, but let's make sure everyone understands the context of your statement:
From your bible Wikipedia: "the language is predominantly used on the client-side"
On all of the developer forums I use (about 6) they all have Javascript sections and all of the posts I've ever seen are related to the JS on the client side. So, I'd say very few people program in Javascript on the server side. I don't and all the JS developers I know and talk with don't.
I think this is because there is no reason to really. PHP is such a strong server-side language and is so popular, why would you use JS on the server side instead of PHP or Ruby or Python? JS shines on the client side to be sure. It's certainly not very popular on the server side.
Visit any developers forum and check the activity of each of the server-side scripting languages and you'll find by far PHP is the most popular. Even .ASP lags behind and there are a lot of .ASP developers. Ruby is far, far behind PHP in popularity and activity. Python even farther. This does not mean those are bad or poor languages, it just means not as many developers are using them.
-
06-14-2011, 09:56 AM #10
Fixer Upper
- Join Date
- Jun 2011
- Posts
- 29
I didn't say it was the most popular. I said it was possible and there are hundreds if not thousands of javascript image galleries written completely in javascript. Like so
Galleria – The JavaScript Image Gallery
Lightbox 2
57+ Free Image Gallery, Slideshow And Lightbox Solutions - (Here are 57 of the best right here)
etc...
The reason for using javascript and not using javascript basically are the same, javascript is simple, It is easy to implement, flexible, and has access to all the DOM manipulation client side javascript has allowing great CSS manipulation. Using the Jquery library can bring a whole new world of interactivity to your site. So I would be careful to dismiss javascript as an image gallery option, as it is very powerful and already being used everywhere.
PHP is a great language don't get me wrong it pays my bills haha. But for something so simple and probally static javascript is fine. You will only need to get PHP involved when you need to access a SQL database, move or manipulate the photos, etc...Real Estate Portal Software - Fully Featured Real Estate Portal Software for Newspaper's, Real Estate Agents, & Entrepreneurs



LinkBack URL
About LinkBacks






Reply With Quote
Bookmarks