Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Need to Link to an Image on another Page already containing multiple images

Need to Link to an Image on another Page already containing multiple images

Scheduled Pinned Locked Moved Web Development
csharphtmltutorialquestionlearning
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 12046748
    wrote on last edited by
    #1

    hello again... I need to create a link on one page (my home page) that links directly to a image on another page already containing multiple images. Thought I knew how to do it...by creating an anchor; & my code looks like this: a href="theOtherPage.html#PHOTO.png">IMAGE SUBJECT but it doesn't work. Even tried the forward slash after the page id: a href="theOtherPage.html/#PHOTO.png">IMAGE SUBJECT (of course both snippets are encased w/ [...just couldn't get that to work here) when the user clicks the link, I want them to be directed right to a specific image on a 2nd page...here's the page:](</a) http://www.moonjams.net/events.html there's 2 images there now, but there will eventually be more. Thought it was just a simple anchor, but does anyone have any idea what I'm doing wrong? thanx, mark4man

    U Richard DeemingR S 3 Replies Last reply
    0
    • U User 12046748

      hello again... I need to create a link on one page (my home page) that links directly to a image on another page already containing multiple images. Thought I knew how to do it...by creating an anchor; & my code looks like this: a href="theOtherPage.html#PHOTO.png">IMAGE SUBJECT but it doesn't work. Even tried the forward slash after the page id: a href="theOtherPage.html/#PHOTO.png">IMAGE SUBJECT (of course both snippets are encased w/ [...just couldn't get that to work here) when the user clicks the link, I want them to be directed right to a specific image on a 2nd page...here's the page:](</a) http://www.moonjams.net/events.html there's 2 images there now, but there will eventually be more. Thought it was just a simple anchor, but does anyone have any idea what I'm doing wrong? thanx, mark4man

      U Offline
      U Offline
      User 13749660
      wrote on last edited by
      #2

      You should make classes of all images file. and call the class where you want to insert the images. i am working in dubai city their is a software house where i work. all employes do this method. whenever they calling anything on the page. making classes is the best way in any code.

      1 Reply Last reply
      0
      • U User 12046748

        hello again... I need to create a link on one page (my home page) that links directly to a image on another page already containing multiple images. Thought I knew how to do it...by creating an anchor; & my code looks like this: a href="theOtherPage.html#PHOTO.png">IMAGE SUBJECT but it doesn't work. Even tried the forward slash after the page id: a href="theOtherPage.html/#PHOTO.png">IMAGE SUBJECT (of course both snippets are encased w/ [...just couldn't get that to work here) when the user clicks the link, I want them to be directed right to a specific image on a 2nd page...here's the page:](</a) http://www.moonjams.net/events.html there's 2 images there now, but there will eventually be more. Thought it was just a simple anchor, but does anyone have any idea what I'm doing wrong? thanx, mark4man

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        The part of the link after the # character needs to be defined as a "bookmark" within the target page. You do that by setting the id attribute on an element. Eg: target.html:

        <img id="image1" src="..." />

        Link:

        <a href="target.html#image1">Image 1</a>

        You can set the id on any visible element on the page, but it needs to be unique - no other element on the page can have the same id.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        0
        • U User 12046748

          hello again... I need to create a link on one page (my home page) that links directly to a image on another page already containing multiple images. Thought I knew how to do it...by creating an anchor; & my code looks like this: a href="theOtherPage.html#PHOTO.png">IMAGE SUBJECT but it doesn't work. Even tried the forward slash after the page id: a href="theOtherPage.html/#PHOTO.png">IMAGE SUBJECT (of course both snippets are encased w/ [...just couldn't get that to work here) when the user clicks the link, I want them to be directed right to a specific image on a 2nd page...here's the page:](</a) http://www.moonjams.net/events.html there's 2 images there now, but there will eventually be more. Thought it was just a simple anchor, but does anyone have any idea what I'm doing wrong? thanx, mark4man

          S Offline
          S Offline
          Sarcastic CA
          wrote on last edited by
          #4

          I am facing some difficulties in designing of this CA CPT / CA Foundation Registration [^]. I don't know what is happening what it doesn't showing the main image. Please help! Thanks in advance

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups