1 Year
Discussion Span
Last Post by hericles

A button isn't a link, the href attribute has no effect. If you want to redirect to the admin page either style an <a> tag to look like a button or add an onclick event to the button so some javascript can process the redirect.


I try this:

<button type="button" class="button" href="adminform.php" onclick="administrators_form.php">ADD ADMINISTRATOR</button>

It does not show anything.


And it won't. onclick is used to specify which javascript function is called when an element is clicked.
You would need a matching javascript function to go with that on click:
function someFunction() {}
Given that you want to redirect you would then have the window.location.href command in there.

But, given that that is all it appears you want to do, use a <a href="administrators_form.php"> tag instead and style to look like a button.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.