Click to See Complete Forum and Search --> : how can i change the size of a text input box on a web page?
flamewavetech
Oct 20th, 2001, 12:38 PM
how can i change the size of a text input box on a html page?
also how can i make things like checkboxes, and radio buttons on html pages and retrieve there values?
filburt1
Oct 20th, 2001, 01:03 PM
Size as in font size or size as in size of the actual box? And what language for the second question?
Dork 1
Oct 20th, 2001, 01:48 PM
Here is a text box I use on my web page as you see you can use the style thing to change color size border etc..
<input type="password" name="pass" size="15" value="<% = pass %>" style="font-size: 8pt; border: 1px solid #F3CE57; background-color: #000000; color:#F3CE57">
Size="15" makes it only 15 characters long (i think) and the style="font-size: 8pt;" makes the size inside the text small and the size of the text box is smaller aswell
Dork 1
Oct 20th, 2001, 01:50 PM
ack I forgot to mention I'm not sure how much the style thing is supported I know opera dosn't like it to much and Internet Explorer is ok with it not sure about netscape
flamewavetech
Oct 20th, 2001, 01:58 PM
how can i make it multiline?
also how can i put it things like checkboxes, radio buttons, listboxes, etc.?
crptcblade
Oct 20th, 2001, 02:06 PM
for multiline, use a textarea.
For checkboxes,and radio buttons, just change the type attribute of the input. to "checkbox" or "radio"
For lists, I think you use a SELECT element.
:)
filburt1
Oct 20th, 2001, 02:09 PM
Originally posted by crptcblade
for multiline, use a textarea.
Like this:
<textarea name="mytextarea" rows=10 cols=80>Initial value</textarea>
Be sure to enclose it within a form tag.
flamewavetech
Oct 20th, 2001, 02:15 PM
do i still retrieve its value the same way?
like document.form.textarea.value
crptcblade
Oct 20th, 2001, 02:16 PM
yes
flamewavetech
Oct 20th, 2001, 02:27 PM
how can i make it so only one radio button per form can be selected?
and how can i return/set wether they are selected or not?
crptcblade
Oct 20th, 2001, 02:29 PM
checked = false //for not checked
checked = true //for checked
:)
filburt1
Oct 20th, 2001, 02:30 PM
I thought it was value. :confused:
filburt1
Oct 20th, 2001, 02:31 PM
Ah.
<input type="radio" name="radiobutton" value="radiobutton" checked>Sort of like <hr noshade>.
flamewavetech
Oct 20th, 2001, 02:33 PM
ye i tried value and it didnt work. couple more questions thx for all ur help, this is how i learn :)
1. how can i enable or disable a item.
2. how can i make it so only one radio button can be selected per box? do i have to make a script for that?
Dork 1
Oct 20th, 2001, 02:48 PM
Originally posted by Dork 1
ack I forgot to mention I'm not sure how much the style thing is supported I know opera dosn't like it to much and Internet Explorer is ok with it not sure about netscape
its all in one line just to long for the forum (I just cut and past that out of my login script)
Dork 1
Oct 20th, 2001, 02:51 PM
eak i quoted wrong post and after reading what I was wanting to quote I noticed I missread it and what I said had nothing to do with it lol
flamewavetech
Oct 20th, 2001, 03:09 PM
how can i enable or disable a item?
how can i make it so only one radio button can be selected?
and can someone give me a example for making lists and combo boxes?
scoutt
Oct 20th, 2001, 04:49 PM
for radio buttons use something like this to get only one selected. you have to use <menu> also have to make sure the have the same name
<FORM METHOD="post" ACTION="" NAME="form1
<menu>
<INPUT TYPE="radio" NAME="1" VALUE="text">your text here<br>
<INPUT TYPE="radio" NAME="1" VALUE="text2" CHECKED> more text2<br>
<INPUT TYPE="radio" NAME="1" VALUE="text3">text3<br>
<INPUT TYPE="radio" NAME="1" VALUE="text4">text4
</menu>
</form>
now for list boxes like this.
<form>
<select name=sometext>
<option value=1>text</option>
<option value=2>text</option>
<option value=2>text</option>
<option value=2>text</option>
</select></form>
as far as disabling an item I know it can be done but can't remember what it is.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.