SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    send image from one page to display in another page

    Hi,
    I have an html catalogue page with a list of images. Each image has a roll over pop up. I would like to send the user to another page when they click a hyperlinked 'more images' text. I think this can be done with javascript using the getelementbyid(image)src, but i am unsure of the syntax. Also I want to display a much larger image on the other page. If anyone could help me how to do this i would be very very happy.

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You should not be using javascript for this as people with JS turned off can't see it, and neither can search engines.
    Do you know any server side languages?
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  3. #3
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Markdidj View Post
    You should not be using javascript for this as people with JS turned off can't see it, and neither can search engines.
    Do you know any server side languages?
    Hi Markdidj
    I have dabbled with mysql and php but not recently. I acknowledge your advice but I would still like to know if it can be done with js and if you know how would you please help me?
    regards

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,118
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by LennyOneStep View Post
    I would like to send the user to another page when they click a hyperlinked 'more images' text ... Also I want to display a much larger image on the other page
    This is just standard HTML. You don't need any scripting for that.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LennyOneStep View Post
    Hi Markdidj
    I have dabbled with mysql and php but not recently. I acknowledge your advice but I would still like to know if it can be done with js and if you know how would you please help me?
    regards
    The problem is getting the list of images at the new page. How do you know what images to display? As ralph.m mentioned you can use HTML, but you'd have to build each page by hand and manually add the images.

    You might be able to use window.open(), and then push the list of images to the new window.

    Ah yes, sorry I don't use window.open() as I try to create things that work without javascript. It can be done though.

    http://www.javascript-coder.com/wind...dow-open.phtml shows how to add a h1 to a popup window so you could open a popup and insert the images in the same way this page inserts a h1
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  6. #6
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Markdidj View Post
    The problem is getting the list of images at the new page. How do you know what images to display? As ralph.m mentioned you can use HTML, but you'd have to build each page by hand and manually add the images.

    You might be able to use window.open(), and then push the list of images to the new window.

    Ah yes, sorry I don't use window.open() as I try to create things that work without javascript. It can be done though.

    http://www.javascript-coder.com/wind...dow-open.phtml shows how to add a h1 to a popup window so you could open a popup and insert the images in the same way this page inserts a h1

  7. #7
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again Mark, I don't want to send a list of images, just one. The images are located on one page, I want the user to click on an image, any image, and then just that image is then displayed on another page in larger detail. I don't really want to have a separate page to display each larger image. I think each image would have to be hyper linked with it's source? does that make sense?

  8. #8
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph, OK. It would be appreciated if you could post the standard html hyper link to the largerpic page which would display the image clicked in larger detail on the largerpic page.
    regards

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,118
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by LennyOneStep View Post
    It would be appreciated if you could post the standard html hyper link to the largerpic page which would display the image clicked in larger detail on the largerpic page.
    Something like this would do the job:

    Code:
    <ul>
      <li><a href="/images/large1.jpg"><img src="/images/small1.jpg" alt=""></a></li>
      <li><a href="/images/large2.jpg"><img src="/images/small2.jpg" alt=""></a></li>
      <li><a href="/images/large3.jpg"><img src="/images/small3.jpg" alt=""></a></li>
    </ul>
    So, you have a list of thumbnail images (e.g. small1.jpg) wrapped in links to the large version. Clicking the link will result in the large version appearing in the browser window. You don't have to set up a page for it—although, if you don't, each browser will choose how it displays the image. In Firefox, for example, the image will appear in the center of the screen with a dark background. Simple, but effective.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  10. #10
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Ralph, I see what your doing there, but I would like something as shown in the link below. When a user clicks on an image see where it takes you. That is what I want (or something like it )
    regards
    https://www.easyliveauction.com/auct...&currentpage=1

  11. #11
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,118
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    OK. Well, you can do that with a standard content management system (CMS). You have a template for the thumbnails, and a template for showing the enlarged image on a new page. This is easy to do with a CMS like ExpressionEngine. It's PHP-based, but you don't have to know any PHP to set it up.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  12. #12
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That sounds great! can you point me to how I can get started. I know some PHP (enough to understand it I hope) Shall I just google ExpressionEngine? I shall anyway but wondered if you have any personal recommendations thanks again.

  13. #13
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,118
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by LennyOneStep View Post
    That sounds great! can you point me to how I can get started..
    There are many other CMSes, and I'm sure others will recommend their favorites, but ExpressionEngine is a pretty cool one, though it's nto free. a similar free one is MODx, although I can't vouch for how easy it might be to set up something like you've described in that CMS. It's very easy with EE.

    There are extensive docs for EE (as well as books, if you want them) that will get you started.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  14. #14
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •