50 users online (1 members and 49 guests)  


  Results 1 to 4 of 4

Related

  1. simple dbase script    Forum: Databases
    Replies: 3
  2. Simple picture loading script?    Forum: Javascript Forum
    Replies: 4
  3. Replies: 0
  4. Replies: 7
  1. #1
    movieweb's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    3

    Simple picture loading script?

    Hello,

    I'm looking to accomplish a simple picture loading script. Should be pretty easy, and any help is appreciated, considering I don't even know where to start.

    I'm looking to have say 5 links on a page. Just as well, there is 1 picture spot on the page.

    These 5 links, when any of them are clicked, load the corresponding picture into the picture box.

    Make sense? Nothing is preloaded, just loaded when one of the links is clicked, and then the picture loads into the picture spot.

    All help is deeply appreciated!

    Thanks in advance!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya,

    make an image with a name, you can then access it like this -
    Code:
    <img src="first-image.gif" name="swappy"><br /><br />
    <a href="javascript: void(0);" onClick="document.swappy.src='second-image.gif';">bleh</a>
    Thats obviously a simplified example, you should be able to go from there.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    movieweb's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    3
    Thanks Dean!

    Working great, now I actually came up with a new dilema...

    What if I want to link these images to the various higher resolution counterparts?

    For instance, image 1, image 2, image 3...

    When loaded, the correct HREF tag loads with the image, when any are clicked they go to their correct high res counterpart.

    Make sense?

    Any more help is greatly appreciated! Thanks!

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Ah. We will have to take a completely different approach.

    Just got in from work, and its already time for bed :S so leave it with me, I'll cook some code up tommorow.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread