How to create a pushbutton on a web page?

  stlucia2 17 Aug 12
Locked
Answered

For many years now I have created and maintained a web site for a club I'm a member of. It is hand-coded in HTML, and contains a dozen or so pages with text and graphics; and the links between pages are simple text using the "A HREF= ..." command.

I'm trying to smarten up the site by using pushbuttons, and have been reading up on the "BUTTON" command. I've got one code that works as follows:-

*

*

... and another one that doesn't:-

**

in each case without spaces after and before the .

The first example works fine; the second one only creates a very small button with no text in it, but it does go to the correct page when clicked. So, any idea what's wrong with its code, please?

Also, I thought that defining the style and colour of the text on the button would be a simple matter of inserting ** (or whatever) into the code, but it doesn't seem to do anything. So can someone help me on that, please?

  stlucia2 17 Aug 12

Oh *$^&", the preview screen showed the codes okay, so how do I get them to display in the forum? I'll try again ...

The one that works is:-

... and the one that doesn't is:-

  stlucia2 17 Aug 12

Try again:-

The one that works is:-

(form) (input type="button" value="Click here to enter" onclick="window.location.href='contents.htm'") (/form)

... and the one that doesn't is:-

(button type="button" value="Click here to enter" onclick="window.location.href='contents.htm'") (/button)

Where the curved brackets represent a "" as appropriate

  stlucia2 17 Aug 12

Okay, nearly there!!

The curved brackets in my two examples represent the standard HTML angle brackets.

  stlucia2 19 Aug 12
Answer

I've posted on the Web Design page, and got an answer there. So I'm ticking this one resolved.

Advertisement

This thread is now locked and can not be replied to.

Should I upgrade to Windows 10? 8 reasons why you should upgrade to Windows 10... and 2 why you…

We are being sold the ability to spend money we don't have. And we love it

IKinema aims to banish droopy shoulders and wonky spines in animated CG characters

How to use Apple Music in the UK: Complete guide to Apple Music's features

We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message