Make button in one page go to a gallery of pictures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cdm2883
    New Member
    • Sep 2007
    • 53

    Make button in one page go to a gallery of pictures

    how do i write the code to make a button one page and make it go to a gallery of pictures?


    Thanks
    David
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    hi
    Ithink you just want a button as a link. and if so you can use this

    Code:
    <form>
    <input type="button" value="Gallery" OnClick="window.location.href='myGaller.html'"> 
    </form>

    Comment

    • cdm2883
      New Member
      • Sep 2007
      • 53

      #3
      Originally posted by harshmaul
      hi
      Ithink you just want a button as a link. and if so you can use this

      Code:
      <form>
      <input type="button" value="Gallery" OnClick="window.location.href='myGaller.html'"> 
      </form>





      When you say window.location .href what needs to go there. Sorry i am teaching my self this as i go along.


      Thanks
      David

      Comment

      • Death Slaught
        Top Contributor
        • Aug 2007
        • 1137

        #4
        Originally posted by cdm2883
        When you say window.location .href what needs to go there. Sorry i am teaching my self this as i go along.


        Thanks
        David
        [CODE=javascript]window.location .href[/CODE] is JavaScript not HTML/CSS. href is the location that the link is supposed to take you to. For example.

        [CODE=javascript] window.location .href='http://www.google.com'[/CODE]

        This will take you to google. If you want it to be to another page in your site. You put in the location of that page. If you have an HTML page called 'mypage.html', and it was in the same folder as the page with this button, you would change it to this.

        [CODE=javascript] window.location .href='mypage.h tml'[/CODE]

        Hope it helps, Thanks, Death

        Comment

        Working...