473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help Please - how do I load a new HTM page using onClick

DK
I am very new to JS and trying to use a button to move on to a new html page
rather than a text link.

The code I have is as follows; (having tried to wrap the button in a HREF)

<A HREF="index.htm">

<input type='button'
id='Button2'
name='Button2'
style='width:146px;height:46px;border:1px#000000

solid;background-color:#FFFF99;color:#000033;font-family:Verdana;font-size:1
0pt;'
value='INDEX'
onClick='return true;'


</input>
</A>

This does not work not sure why, I originally tried calling a js function
jsLoad() to load a new page but don't quite know how to do this?

<SCRIPT LANGUAGE=javascript>
<!--
function jsLoad()
{

don't know what to put here !!!!!

}
//-->
</SCRIPT>

Any help on this would be much appreciated.

Regards

David
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
Jul 20 '05 #1
2 17140

"DK" <asas07(AT)dsl.pipex.com> schreef in bericht
news:3f*********************@news.dial.pipex.com.. .
I am very new to JS and trying to use a button to move on to a new html page rather than a text link.


<input type="button" onclick="location='index.htm'" value="INDEX" />
JW

Jul 20 '05 #2
"DK" <asas07(AT)dsl.pipex.com> wrote:
I am very new to JS and trying to use a button to move on to a new html
page rather than a text link.
I really hope that this is a learning exercise. Using JS to simulate things
that can be done in HTML is not a good idea.
The code I have is as follows; (having tried to wrap the button in a
HREF)
So is the objective to use a button as a link? Don't, use a link as a link
and then style it to look how you want.

http://tom.me.uk/2002/8/css-buttons.html
This does not work not sure why, I originally tried calling a js function
jsLoad() to load a new page but don't quite know how to do this?

<SCRIPT LANGUAGE=javascript>
<!--
function jsLoad()
{

don't know what to put here !!!!!


Set document.location to the URI you want.

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: . . | last post by:
Hi I need some help with java script . I have a ASPX page that is pulling a user message heading from the table on the page . The user message header has message body which suppose to dispay...
4
by: ani | last post by:
I have a datalist control in my aspx page(this is paginated and everytime submits to itself). I am calling a function within my datalist that returns a html control (radio button ) in the form of...
4
by: Chris | last post by:
Hi, I am trying to create a popup calender so a user can click on a button on the main form, a calender will then popup, the user will select a date and then click ok on the popup. The date will...
5
by: Chris | last post by:
Hi, I have been trying for days, yes days, to use the calender from the asp.net timetracker starter kit. I am now frustrated. I finally get the popup calender to popup but when I click ok to...
1
by: donradii | last post by:
Hello all, I am new here and am new the world of javascripting. I am having a heck of a time trying to accomplish something that i conceptually know what i want to do but can not seem to get it...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
2
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the...
7
by: gubbachchi | last post by:
Hi all, In my application I need to display the data fetched from mysql database after the user selects date from javascript calender. I have written the code in which after the user selects the...
3
by: neilfarah | last post by:
This is a xmlDoc.load routine through either IE or Firefox. An RSS URL is loaded into a form. After Onclick of a button a second window is launched and a parsed listing of the original RSS file is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.