Solved

Triggering a Script in HTML

Posted on 2009-07-01
2
163 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 250 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 250 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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

691 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