Results 1 to 18 of 18

Thread: how can i change the size of a text input box on a web page?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746

    how can i change the size of a text input box on a web page?

    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?

  2. #2

    Re: how can i change the size of a text input box on a web page?

    Size as in font size or size as in size of the actual box? And what language for the second question?

  3. #3
    Addicted Member
    Join Date
    Jul 2001
    Posts
    141
    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
    The Number 1 Dork
    PHP Forum

  4. #4
    Addicted Member
    Join Date
    Jul 2001
    Posts
    141
    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
    The Number 1 Dork
    PHP Forum

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746
    how can i make it multiline?

    also how can i put it things like checkboxes, radio buttons, listboxes, etc.?

  6. #6
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  7. #7
    Originally posted by crptcblade
    for multiline, use a textarea.
    Like this:

    Code:
    <textarea name="mytextarea" rows=10 cols=80>Initial value</textarea>
    Be sure to enclose it within a form tag.

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746
    do i still retrieve its value the same way?

    like document.form.textarea.value

  9. #9
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    yes
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746
    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?

  11. #11
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    checked = false //for not checked

    checked = true //for checked

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  12. #12
    I thought it was value.

  13. #13
    Ah.
    Code:
    <input type="radio" name="radiobutton" value="radiobutton" checked>
    Sort of like <hr noshade>.

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746
    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?

  15. #15
    Addicted Member
    Join Date
    Jul 2001
    Posts
    141
    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)
    The Number 1 Dork
    PHP Forum

  16. #16
    Addicted Member
    Join Date
    Jul 2001
    Posts
    141
    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
    The Number 1 Dork
    PHP Forum

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2001
    Posts
    746
    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?

  18. #18
    scoutt
    Guest
    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
    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>
    now for list boxes like this.
    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>
    as far as disabling an item I know it can be done but can't remember what it is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width