Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > attribute value in a html button

Reply
Thread Tools

attribute value in a html button

 
 
Matt
Guest
Posts: n/a
 
      06-23-2004
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??


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      06-23-2004
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Alan Howard
Guest
Posts: n/a
 
      06-23-2004
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

"Matt" <> wrote in message
news:...
> 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??
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xslt: how to use value from xml data as an attribute value in output html? =?UTF-8?b?5byg6Z+h5q2m?= XML 3 10-23-2006 02:31 PM
Change the value of an attribute according to the value of another attribute patrizio.trinchini@googlemail.com XML 8 08-22-2006 02:53 PM
wrapping long attribute value (line-continuation for attribute value) lophiomys@gmx.at XML 1 08-02-2006 01:18 PM
picking value of one attribute based on a child elements attribute? XPath? vjethava@gmail.com XML 2 03-06-2006 05:19 AM
attribute value in a html button Matt HTML 3 06-23-2004 08:51 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57