Tech Helproom
It's free to register, to post a question or to start / join a discussion
How to create a pushbutton on a web page?
Likes # 0
Posted August 17, 2012 at 12:05PM
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?
Likes # 0
Posted August 17, 2012 at 12:09PM
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:-
Likes # 0
Posted August 17, 2012 at 12:16PM
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
Likes # 0
Posted August 17, 2012 at 12:18PM
Okay, nearly there!!
The curved brackets in my two examples represent the standard HTML angle brackets.
Likes # 0
Posted August 19, 2012 at 11:38AM
I've posted on the Web Design page, and got an answer there. So I'm ticking this one resolved.
Reply to this topic
This thread has been locked.



