Results 1 to 4 of 4

Thread: onclick to change textbox

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390

    onclick to change textbox

    i want an onclickevent to change the text in a text box - how can i do this with getelementbyid

    thanks kris

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Does the textbox actually have an id?
    Otherwise, just access it through the form, or use .elements[]
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Frenzied Member TomGibbons's Avatar
    Join Date
    Feb 2002
    Location
    San Diego, CA Previous Location: UK
    Posts
    1,345
    Also bear in mind that Javascript is case sensitive, so you must use document.getElementById('id')

    Just in case you've been trying getelementbyid

  4. #4

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390
    ino that -- it was the property i wanted ... dw i have found out now

    getElementById('txtTo').value

    is what i wanted 2 no

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