Jump to content

form buttons


dumdumsareyum

Recommended Posts

I'm not sure what the best way to go about doing what I want to do is (or if there is just some way to do this using css)......I have links to several pages in a navigation section that all use the same button. To do this I put each link in a table cell, I gave the cell the background image I had made of the button using a class called "button" then I put a link in the table cell. I also have a button:hover that makes the button glow when you mouseover the table cell.    So I wanted my form to have the same kind of button as the ones in the navigation, I did it the same way, with a link in the table cell and so the link there looks something like this: 

 

<a href="search.php" title="Search" onClick="this.form.submit(); return true;">Search</a> 

 

which doesn't work.....I'm just starting to learn javascript...so I tried  onClick="q_search.form.submit();"  (q_search is the name of the form) because it's not tecnically a form element I thought maybe i needed to specify the form i wanted to submit. I also tried putting an onSubmit that would return true in the form tag. That didn't work either....by "doesn't work" i mean the form data is not appearing in the url the way it does when I put a regular submit button in.

 

I tried using an input type of image, but I really kind've wanted to keep the button and the text seperate so I didn't have to make a bunch of different buttons, and so that if I decided to change the font it wouldn't be a big deal.

 

What's the best way to do this?

 

Link to comment
https://forums.phpfreaks.com/topic/65346-form-buttons/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.