Solved

Triggering a Script in HTML

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

730 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