Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Triggering a Script in HTML

Posted on 2009-07-01
2
Medium Priority
?
165 Views
Last Modified: 2013-11-19
Hello,

I am totaly new to HTML.
1. I built few pages. On one page I have a button, I want to add an event that when I click this button another page opens.
I know I need to use OnClick event but how to add a link to another page?

2. And where can I find examples for how to do such things?  like windows.status="  "...

THANKS
0
Comment
Question by:margarit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
OrionsX earned 1000 total points
ID: 24754306
One way to link to a URL is
<input type=button onClick="location.href='index.html'" value='click here'>

As far as examples go you can try looking at the pages below as well as their associated pages
www.htmlcodetutorial.com/.../linking_famsupp_126.html 
www.webdesign.org/web/web.../window-status.11127.html 
www.w3schools.com/htmldom/prop_win_status.asp 

0
 
LVL 5

Assisted Solution

by:Opalelement
Opalelement earned 1000 total points
ID: 24760923
onclick uses Javascript which can be disabled in the user's browser and is sometimes hard to use...

HTML has a built in way to go to a different page. The Anchor tag <a> is a link.

<a href="http://google.com">this is link txt</a>

The above will show you "this is link txt", and when you click on it you will be taken to http://google.com

http://www.tizag.com/htmlT/links.php
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question