CSS: Container Displaying Images with Next Function

topic posted Sat, October 14, 2006 - 2:38 PM by  Shannon
Hello,

I'm in need of some guidance.

I have 4 images I want to display within a container, one at a time, by clicking next.
Very simple in style.

Display Window

previous 1 2 3 4 next

i've been trying to search the net for info, but I guess I'm putting in the wrong search words.

Any advice?

Thanx!
posted by:
Shannon
Vancouver
  • "I have 4 images I want to display within a container, one at a time, by clicking next.
    Very simple in style.

    Display Window

    previous 1 2 3 4 next " (Shannon)

    Okay, Shannon and Pix - I'm going to display my primitive knowledge here, but I've been wanting to ask this for awhile.

    Why not just create four pages (one for each image) and link them?
    (No, java, php, etc)

    Basically I would just be making 3 copies of the first page and have a different image for each (remember, I told you my knowledge is primitive).

    Then again, I guess it depends on how the page will be used.
    But, if the page will not have any content updates ... when its done; its done then you can just have 4 pages.
    But, if the container is part of a page whose other content will be subject to change - I can see the advantage in incorprating something like java. Would php be useful for something like this also?

    Will
    • well first of all javascript is not java or jsp (java server pages) those ar ea whole other can of worms. You would use java script essentially because its client-side, meaning the code is run and interpeted in the client browser, not on the server, thus you dont have to "go back" tot he server for the processing of your instruction AND it can be used to effect all sort of attributs of the browser and its windows and the elements on the page - on the fly. So from that the issue with making for seperate pages is that you have to load what is essentially the same page 4 times. And with php or any other server-side language you would have to process the code and load the page 4 times. Why do this when you could load a neglibably larger page (probably a couple hundred couple kbytes) once and then use JS to simply shuffle things around when the user performs certain actions?
      • Thanks Pixel,

        “So from that the issue with making for seperate pages is that you have to load what is essentially the same page 4 times. And with php or any other server-side language you would have to process the code and load the page 4 times. Why do this when you could load a neglibably larger page (probably a couple hundred couple kbytes) once and then use JS to simply shuffle things around when the user performs certain actions?”

        Why:
        - Cause I don’t know java script; just an amateur page builder; hands pretty full with CSS.
        - I’m referring to pages that are complete, as in part of an album – other content won’t change.
        - I would think the load time would be minimal (all 4 pages would be nearly identical except for some text), wouldn’t they be loading mostly from cache – except for new image?
        - It may be rare, but don’t some browsers have javascript turned off?

        But, if this is not good reasoning, I guess I will need to bite the bullet and start learning some java script .

        Will
        • Well i was thinking of something more in context of a lightbox where you might have a dive with say 12 thumbnalis and when you click on one it loads the full size image in another div. With the eaxample you mentioned there wouldnt be much "need" for js but it might make the interaction abit mor elegant for the user. But still even given this and even if most of your layout is cached its still probably going to take longer to reload the entire layout to change one image than it is going to be to front load them all and then jsut change what is displayed. Your last point is a valid one.

          Hey youre in control of what you want to learn and when im not suggesting you have to use JS or learn JS or anything like that... its jsut another tool in the tool box... sometimes its a necessity, sometimes i jsut makes life easier, and sometimes its completely useless :-)

Recent topics in "- webdesign -"