October 4th, 2011, 01:33 PM
Link image from page to another
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.
October 4th, 2011, 06:23 PM
If you make the link on your first page like this
When you click on image.jpg you should open page2.html and go to id 101 on that page
<a href='page2.html#101'><img src="image.jpg" alt="link to page2"></a>
October 5th, 2011, 02:25 PM
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.
Originally Posted by BarryG
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.
October 5th, 2011, 05:15 PM
The BlueArrow.jpg on page 1 needs this to tell page 2 to load, and go to id #117.
<a href="index.php?/route=information/information&information_id=7#117"><img src="BlueArrow.jpg" alt="next page"></a>
October 5th, 2011, 05:30 PM
i think u must take help of someone how know certain jobs,what to do or how to do.
October 5th, 2011, 05:33 PM
I suggest you to search via google and youtubes videos and look for good reviews
and friend's honest recommendation
October 6th, 2011, 08:49 AM
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.
October 6th, 2011, 04:52 PM
He's a n00b. Just ignore him.
Originally Posted by defiantclass
Welcome to DevShed Forums, defiantclass.
Comments on this post
November 3rd, 2011, 11:16 PM
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.