HTML, linking problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • quartz
    New Member
    • Aug 2007
    • 19

    HTML, linking problem

    Hello,

    I would like to have on the top of the page numbers like:
    3 6 9 12
    and when I click on the one of the number the get picture bellow on the same page, and same for all numbers. Don't need to go back...

    Any help???
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    and when I click on the one of the number the get picture bellow on the same page, and same for all numbers. Don't need to go back...
    Please explain, because maybe I do not understand the problem. All I can see is that you want page numbers to be displayed as links to imgaes. When clicked an image will show up on the same page. Is that correct?

    Ronald

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      Any time you ask for behavior of an element, you are asking for a script. 'onclick' specifically is for scripting. So you should ask this question in the javascript forum. I will transfer this there.

      Comment

      • RamananKalirajan
        Contributor
        • Mar 2008
        • 608

        #4
        Hello Quartz, I give you a code, but i dont know it really matches your requirement. I have used the images having the file name as 3.jpg, 6.jpg, 9.jpg and 12.jpg. The following is the code, If more doubts post me back

        [HTML]<html>
        <head>
        <script language="javas cript" type="text/javascript">
        function changeThis(elt)
        {
        var x = elt.value;
        var y = x+".jpg"
        document.getEle mentById('imgbo x').src = y;
        }
        </script>
        </head>
        <body>
        <input type="button" value="3" onclick="change This(this)">
        &nbsp
        <input type="button" value="6" onclick="change This(this)">
        &nbsp
        <input type="button" value="9" onclick="change This(this)">
        &nbsp
        <input type="button" value="12" onclick="change This(this)">
        <br/>
        <div>
        <img src="3.jpg" id="imgbox">
        </div>
        </body>
        </html>[/HTML]

        Regards
        Ramanan Kalirajan

        Comment

        Working...