I just want to make a button in a form that runs some javascript when I click it. I've been doing it with: <input type='button' name='bob3' value="8 PM Nights & Weekends" onClick="javascriptstuff"> So when displayed, it looks something like this: Code: +------------------------------+ | 8PM Nights & Weekends | +------------------------------+ Can I make it: +---------------------+ |8PM Nights & Weekends| +---------------------+ I've got like 15 of these on screen and it's hard to get them to fit when they are all spacing out.
Using CSS you could make it a specific width, for example 100 pixels. If you don't wish to use CSS, I'm not sure if you can accomplish it. -- zenzelezz
meaning I've got 15 variable length names in a database that could change, and I want to pull them out and slap them on a button. I've used CSS to say padding:0; and margin:0; but it didn't change anything. (everyone is using IE 5.5)
Could you achieve the button functions with links? If so you could create some fake buttons using images and HTML, something like THIS If you need to submit a form, just use a bit of JavaScript on the link: <a href="javascript:formName.submit();">Button Text</a>
I ended up just setting some onClick events for the <td> cells the item was in. The problem came when we found out instead of checking a box for each 'feature', the users needed to be able to add multiple items to each 'feature'. The problem is when using text when you click two or three times it selects the text, making it look funny and 'feel' awkward to use. The button was perfect, except for the sizes. It doesn't look as good as it could, but it is much better than what we were using. As for using the images, for some reason the style="cursorointer;cursor:hand" doesn't take, which is a vital part of the application, right? =P