473,320 Members | 2,189 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,320 software developers and data experts.

How to create a button that references a hyperlink

I want to create a button on my page that when clicked, will take me to my homepage. Using just a link on the page works

Expand|Select|Wrap|Line Numbers
  1.  <a href="index.html">Main Page</a 
,

but I want to use a button. I've noticed posts mentioning javascript, but I'm already using php in this page, and I want to do the button with HTML. Can anyone help me out with this? Thanks in advance....
Aug 9 '08 #1
2 1817
acoder
16,027 Expert Mod 8TB
Well, you can use JavaScript on a page generated by PHP.

If you only want to use HTML, only a submit button can work, but that would be a bit hackish, so I guess JavaScript is your best bet.
Aug 9 '08 #2
surely you can only do this by writing a teeny-weeny bit of onclick code? (or as mentioned, a mini-form)

[HTML]<input type = "button" value = "Go Home!" onclick = "window.location.href='index.php'">[/HTML]

it's the most manageable bite-sized bit of code around... :]

unless we're just talking theoretical conundrums. in which case, nope. js has to appear somewhere in a problem like this one.
Aug 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: The Dana's | last post by:
I need to create a static HTML file that runs only on the local client PC. On the page (say PageA.htm), I would like for a hypelink to another page (Page B) to appear ONLY if the target file the...
7
by: IntraRELY | last post by:
I am using the following command to launch and .NET VB Executable, which is a simple Windows Form (printCheckClient.exe). I am using a HyperLink Control and works perfect....
4
by: Miguel Dias Moura | last post by:
Hello, I created a datalist in an ASP.Net / VB page. I display the image and price of a few products. When a user clicks an image I want to load the page "detail.aspx?number=id" and send the...
1
by: Joshua Weir | last post by:
Hi, I want to simply add hyperlink functionality to a normal web control button. I understand that i can use the hyperlink button for this but in this case i dont want to do this. Say i have...
1
by: news.microsoft.com | last post by:
Hello and first of all thank you for your time. I am currently developing an ASP.net web page, which has data stored in SQL Server. It is a web page for a State Agent and my problem is: I need...
0
by: Waran | last post by:
Hi, In a datagrid I am displaying 2 columns. One is a Hyperlink Colum and the other is a Button Column. The values for the hyperlink columns are fetched from the database and its a url. When I...
3
by: The Woo | last post by:
Can one programatically create a file folder which has the same name as a key field, using a command button? Or, Can there be a a command button which opens up a directory tree to a specified...
5
by: Thirdworld | last post by:
I'm trying to create a hyperlink button on a form that does the following: 1. User clicks on button 2. The default 'insert hyperlink' window appears 3. User selects the desired file 4. User...
2
by: =?Utf-8?B?Q2hhcnRz?= | last post by:
I have been writing C# programs to spider yellow page to get list of restaurant name, address to the database. When I encounter button or hyperlink, I don’t know how to use the program to click...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.