0

I have tried many different ways to go about this however i cant get this to work properly.

Im trying simply to make a "styled" button link to a certain page.

Current code:

<input type="submit" href="aim:goim?screenname=Element18592&message=Hey, Im interested in one of your services." class="btn btn-default" value="Contact">

A link to the page containing this example is: http://www.themodshop.co/shop/test.html

Also when a button is clicked and the cursor is moved away why does it stay black?

When you click on the button titled contact, you will notice it simply does nothing, where im trying to make it link to a certain url the href in the code above. You can go visit the link below and click on "Visit our store" to see a clear example of what im trying to accomplish when the button is clicked

http://www.themodshop.co/shop/

Thank you greatly for any help.

user3627587
  • 33
  • 1
  • 8

2 Answers2

1

Only <a> elements can have a href attribute. Inputs and buttons are used for forms only.

Try this instead:

<a href="aim:goim?screenname=Element18592&message=Hey, Im interested in one of your services." class="btn btn-default">Contact</a>
  • This is pretty close, its doing exactly what im wanting however the button is white? – user3627587 May 19 '14 at 03:44
  • Thats because its not a button its a link. You already have a `class` for the link, so style it accordingly. –  May 19 '14 at 03:45
  • @user3627587 Here is a question that goes through how to make a link look like a button. But it will look out of place on some machines. http://stackoverflow.com/questions/710089/how-do-i-make-an-html-link-look-like-a-button –  May 19 '14 at 03:48
1

maybe you're trying this, perhaps?:

<form action="aim:goim?screenname=Element18592&message=Hey, Im interested in one of your services." method="POST">

    <input type="submit" class="btn btn-default" value="Contact">

</form>

only applies if you have some information to submit, otherwise i suggest you use a like the other answer suggested.

Viscocent
  • 2,024
  • 2
  • 19
  • 26
  • That is mostly what im looking to do, however is there a way to do it with javascript possibly? Because there is no data to actually submit, im just trying to make it look as a button but act as a link. – user3627587 May 19 '14 at 03:40