#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    Link image from page to another


    Hello,

    I am not experience with HTML, PHP, or web design. I am working on a site using OpenCart which I believe is done in PHP.

    I have an image on one page and I want to be able to click on the image and go to another page, but also to the area of the page where the corresponding image and imformation is.

    In the image properties of the image on the first page, I have put the url of second page in the Link field. That brings me to the correct page ok.

    I have also assigned an image ID to the image on the second page, hoping that it could be used to get to it from the first page.

    When I look at the source of the second page, my image id is written like: img alt="" id="101"

    Perhaps this is of no help, I don't know. I'm trying to find an easy way of doing this. Anything beyond this is probably out of my reach.

    So, is there a way to modify the url/link from the image in the first page to specifically reference the image ID on the second page, so when clicked, you not only go to another page, but to the area of that page where the image is (like if the image was near the bottom of the page)?

    Thanks, sorry if this is not the right forum.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    Sydney Australia
    Posts
    178
    Rep Power
    83
    If you make the link on your first page like this

    Code:
    <a href='page2.html#101'><img src="image.jpg" alt="link to page2"></a>
    When you click on image.jpg you should open page2.html and go to id 101 on that page
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0
    Originally Posted by BarryG
    If you make the link on your first page like this

    Code:
    <a href='page2.html#101'><img src="image.jpg" alt="link to page2"></a>
    When you click on image.jpg you should open page2.html and go to id 101 on that page
    Thanks for the response. I tried this as I understand you to say it, but I think I'm not following exactly. Can we just say that the following are my url's and images, and you rewrite the string as it should be? I'd really appreciate it, so I can see exactl;y what you mean.

    Page 1: www.mywebpage.com

    Image on Page 1: BlueArrow.jpg (this will be clicked to go to the next page)

    Page 2: www.myywebpage.comindex.php?/route=information/information&information_id=7

    Image on Page 2 to go to: volume.jpg (This is the image near the bottom of the 2nd page I want to be visible when you arrive at page 2)

    Image properties info: <img alt="" id="117" src="http://www.mywebpage.com/image/data/Volume.jpg
    (this is the properties from the image on page 2)

    Sorry for being so simple. I just don't know this stuff.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    Sydney Australia
    Posts
    178
    Rep Power
    83
    The BlueArrow.jpg on page 1 needs this to tell page 2 to load, and go to id #117.

    Code:
    <a href="index.php?/route=information/information&information_id=7#117"><img src="BlueArrow.jpg" alt="next page"></a>
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    21
    Rep Power
    0
    hello,
    i think u must take help of someone how know certain jobs,what to do or how to do.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    21
    Rep Power
    0
    or else,
    I suggest you to search via google and youtubes videos and look for good reviews
    and friend's honest recommendation
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0
    Thanks for your help Berry G.

    edge9987, this is the reason I came to the site. Is that not what these types of forums are for, to get help from someone who knows, and to get honest recommendations? If not, we should probably shut down the forum.
  14. #8
  15. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    Originally Posted by defiantclass
    edge9987, this is the reason I came to the site. Is that not what these types of forums are for, to get help from someone who knows, and to get honest recommendations? If not, we should probably shut down the forum.
    He's a n00b. Just ignore him.

    Welcome to DevShed Forums, defiantclass.

    Comments on this post

    • BarryG agrees
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    Gold Coast, Queensland
    Posts
    7
    Rep Power
    0
    Once you've figured out how to link images try and include rollovers for your images. I used them for my website assignment and makes it look much much better.

IMN logo majestic logo threadwatch logo seochat tools logo