SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict JamieJelly's Avatar
    Join Date
    Jan 2004
    Location
    London
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need to change the contents of an input field

    Hi guys, kinda lame question but cant find the answer!

    I am writing a sort of calculator, I have a text input field as where I display the answer.

    How do I modify the contents of this?

    I have got as far as getElementById('elementName') hehe.

    What lovely piece of syntax will allow me to change the contents of this?

    thanks
    International calls from the UK
    Cheap International Calls

  2. #2
    SitePoint Zealot the DtTvB's Avatar
    Join Date
    Jul 2006
    Location
    Thailand
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.getElementById('elementName').value = 'Some Data!';

  3. #3
    SitePoint Zealot sajjad's Avatar
    Join Date
    May 2005
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good question


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
  •