Solved

Triggering a Script in HTML

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

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.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to dynamically set the form action using jQuery.

803 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