attribute value in a html button

Discussion in 'ASP General' started by Matt, Jun 23, 2004.

  1. Matt

    Matt Guest

    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??
    Matt, Jun 23, 2004
    #1
    1. Advertising

  2. Matt

    Evertjan. Guest

    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)
    Evertjan., Jun 23, 2004
    #2
    1. Advertising

  3. Matt

    Alan Howard Guest

    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??
    >
    >
    Alan Howard, Jun 23, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    3
    Views:
    4,736
    Mitja
    Jun 23, 2004
  2. Replies:
    2
    Views:
    1,075
    Henry S. Thompson
    Mar 6, 2006
  3. Replies:
    1
    Views:
    4,264
    Joe Kesselman
    Aug 2, 2006
  4. Replies:
    8
    Views:
    521
  5. =?UTF-8?b?5byg6Z+h5q2m?=
    Replies:
    3
    Views:
    704
    DeepthiShri
    Oct 23, 2006
Loading...

Share This Page