SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast BouncingGoldfish's Avatar
    Join Date
    Jun 2003
    Location
    The Bowl
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Where to find a list of properties (Particularly for Form Textboxes)

    Anyone have an online list of properties that can be changed?
    In particular, I'm looking to change the properties of a textbox in a form.
    E.g. Border colour & background colour.

    This bit of code allows me to change the text that is initially in the text box (before a user starts to type).

    Code:
     
    document.myForm.tboxMsg.value="New Value";
     
    <form name="myForm">
       <input type="text" name="tboxMsg" value="Old Value">
    </form>
    The question is - what else can I change & is there a big list somewhere?

    My use of the word "properties" and maybe others may be incorrect...Apologies in advance, I really don't know much about javascript.

    Shame on me
    Rgds,
    BG

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're close. All of those are properties of the element's style object, which itself is a property of the element.

    element.style.CSSproperty

    I usually use MSDN for this - because they have the best cross-linked reference. Just watch out for stuff that's IE-only (there's standards information on every page) Just use the MSDN link in my sig
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Enthusiast BouncingGoldfish's Avatar
    Join Date
    Jun 2003
    Location
    The Bowl
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aha!
    Now CSS I know!
    I have been going about things the most complicated way!
    Code:
    <input style="background-color:#f63;border:none">
    This is what I was trying to do!
    Still, your answer was helpful - Thanks!
    I am off to learn a bit more about JS now.

    Rgds,
    BG


Bookmarks

Posting Permissions

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