By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Make button in one page go to a gallery of pictures

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


Thanks
David
Jan 25 '08 #1
Share this Question
Share on Google+
3 Replies


harshmaul
Expert 100+
P: 490
hi
Ithink you just want a button as a link. and if so you can use this

Expand|Select|Wrap|Line Numbers
  1. <form>
  2. <input type="button" value="Gallery" OnClick="window.location.href='myGaller.html'"> 
  3. </form>
Jan 28 '08 #2

P: 53
hi
Ithink you just want a button as a link. and if so you can use this

Expand|Select|Wrap|Line Numbers
  1. <form>
  2. <input type="button" value="Gallery" OnClick="window.location.href='myGaller.html'"> 
  3. </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
Jan 28 '08 #3

Death Slaught
100+
P: 1,137
When you say window.location.href what needs to go there. Sorry i am teaching my self this as i go along.


Thanks
David
Expand|Select|Wrap|Line Numbers
  1. window.location.href
is JavaScript not HTML/CSS. href is the location that the link is supposed to take you to. For example.

Expand|Select|Wrap|Line Numbers
  1.  window.location.href='http://www.google.com'
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.

Expand|Select|Wrap|Line Numbers
  1.  window.location.href='mypage.html'
Hope it helps, Thanks, Death
Jan 28 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.