Jump to content

Buttons as Text


xyn

Recommended Posts

Is this what you mean:
[code]<style type='text/css'>
body, button.link_style, input.link_style {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
}

button.link_style, input.link_style {
border: 0px;
padding: 0px;
cursor: pointer;
background-color: white;
color: blue;
text-decoration: underline;
}
</style>

Click <button type='submit' class='link_style'>here</button> to submit the form[/code]
Link to comment
Share on other sites

i guess my question is: [b]why?[/b]

i'm sure there are ways to style it as you want, like Daniel0 suggested, but there may be better approaches to get your desired result. could you explain what your goal is, and maybe we can help you refine your method a tad.
Link to comment
Share on other sites

[quote author=obsidian link=topic=112103.msg454916#msg454916 date=1161349064]
i guess my question is: [b]why?[/b]

i'm sure there are ways to style it as you want, like Daniel0 suggested, but there may be better approaches to get your desired result. could you explain what your goal is, and maybe we can help you refine your method a tad.
[/quote]

Basically, I wanted a Text Hyperlink instead of a button, but to do the same things as a button; Ie I have a link called Submit, and it submits a form.
Link to comment
Share on other sites

If you want to use text to submit the form then do somthing like this:
[code]<a href="#" onclick="document.formNameHere.submit">Submit form[/code]

Make sure you give your form an name and change formNameHere to what you named your form as. Or if you only have 1 form on the page use form[0] instead
Link to comment
Share on other sites

[quote author=wildteen88 link=topic=112103.msg455510#msg455510 date=1161455555]
If you want to use text to submit the form then do somthing like this:
[code]<a href="#" onclick="document.formNameHere.submit">Submit form[/code]

Make sure you give your form an name and change formNameHere to what you named your form as. Or if you only have 1 form on the page use form[0] instead
[/quote]

exactly. this way, you can style your link as text instead of having to use negative CSS to remove all the defaults of the button
Link to comment
Share on other sites

[quote author=wildteen88 link=topic=112103.msg455510#msg455510 date=1161455555]
If you want to use text to submit the form then do somthing like this:
[code]<a href="#" onclick="document.formNameHere.submit">Submit form[/code]

Make sure you give your form an name and change formNameHere to what you named your form as. Or if you only have 1 form on the page use form[0] instead
[/quote]

that didnt work for me :l
I made my form name "loginForm" and used your method it just goes to top of the page.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.