attribute value in a html button

M

Matt

The code
<input type="button" name="btn" value="ok">

will produce a html button with caption ok and value ok.
The problem is the width of button is dependent on the length of
attribute value.

And I do the following, which is not a good solution.

<input type="button" name="btn" value=" ok ">

The problem is if I want to get the button's value:
Request.Form("btn"), then I need to trim the data.

any ideas??
 
E

Evertjan.

Matt wrote on 23 jun 2004 in microsoft.public.inetserver.asp.general:
The code
<input type="button" name="btn" value="ok">

will produce a html button with caption ok and value ok.
The problem is the width of button is dependent on the length of
attribute value.

And I do the following, which is not a good solution.

<input type="button" name="btn" value=" ok ">

The problem is if I want to get the button's value:
Request.Form("btn"), then I need to trim the data.

any ideas??

Lot's of.

But this is an ASP NG, for serverside(!) coding.

Please search for a HTML, CSS, Javascript or other for follow up.

====================

btw:

<input type=hidden name="btn" value="myvalue">
<button onclick="submit()" style="[width in css-code]">
Hi</button>

please do not respond in this NG.
 
A

Alan Howard

Matt, mate - these are all client-side questions - go ask them in a
client-side group. Use a style sheet and class to make your button
fixed-width (it's a presentation issue) and remove the spaces from around
your values (the 'data').

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top