473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

attribute value in a html button

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??
Jul 19 '05 #1
2 1559
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)
Jul 19 '05 #2
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" <ma*******@hotmail.com> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
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??

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jack | last post by:
Hi, I have a asp page where a checkbox, when clicked will disable all text boxes associated with the page. The following is a part of a code for the checkbox with its name and readonly...
2
by: RN | last post by:
I am dynamically adding a number of HTML buttons to a page... <input type="submit" name="alwaysthesame" id="different1" value="alwaysthesame"> <input type="submit" name="alwaysthesame"...
3
by: The Developer | last post by:
Hi All, I have a web application where I am adding a custom attribute to my ASP.NET text box control and changing value of that attribute at client side using JavaScript. My problem is that...
6
by: btknorr | last post by:
The following html and javascript combination fails to execute in Internet Explorer...does anyone know why? If you change the input's attribute "name" to anything other than "item" it works just...
5
by: Soledad Vel | last post by:
Hi All, i write this code: var sliderwidth=100; var sliderheight = 100; var div1 = document.createElement('div'); div1.setAttribute('id','d5'); div1.setAttribute('style',...
2
by: charles-brewster | last post by:
I'm trying to write a simple JavaScript function which will use a button to copy table cell data into a form input text box as the "value" attribute. The following is intended to test the...
2
by: charles-brewster | last post by:
I have progressed the copytext function test page a little since my original post here in the small hours this morning. It now opens a debugging window so I can try to figure out what it is or...
13
by: Mounir | last post by:
Hi, Assume that right and left are multiple select elements. It's about the following line : right.options=left.options; It copies the content of left.options into right.options, but...
1
by: =?Utf-8?B?U3VtaXQgUmF3YXQgSW5kaWE=?= | last post by:
What I have seen in Asp.net applications that if i put two Asp buttons on the web form(Aspx page) it generates multiple name attribute of input tag on the client side. for eg. <asp:Button...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.