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?
Printable View
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?
Size as in font size or size as in size of the actual box? And what language for the second question?
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
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
how can i make it multiline?
also how can i put it things like checkboxes, radio buttons, listboxes, etc.?
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.
:)
Like this:Quote:
Originally posted by crptcblade
for multiline, use a textarea.
Be sure to enclose it within a form tag.Code:<textarea name="mytextarea" rows=10 cols=80>Initial value</textarea>
do i still retrieve its value the same way?
like document.form.textarea.value
yes
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?
checked = false //for not checked
checked = true //for checked
:)
I thought it was value. :confused:
Ah.
Sort of like <hr noshade>.Code:<input type="radio" name="radiobutton" value="radiobutton" checked>
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?
its all in one line just to long for the forum (I just cut and past that out of my login script)Quote:
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
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
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?
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
now for list boxes like this.Code:<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>
as far as disabling an item I know it can be done but can't remember what it is.Code:<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>