
-----------------------------------
who cares?
Thu Sep 16, 2004 4:50 pm

JavaScript text box question..
-----------------------------------
ok, i've done 2 years of Turing so far, but now i started JavaScript at school...

the teacher made us write a program that tells time and refreshes every second....

anyways, can you please tell me of a way to display that "clock" (just text, nothing else) in a text box?

thanks a lot!

-----------------------------------
Dan
Thu Sep 16, 2004 4:53 pm


-----------------------------------
This is not a fourm for java scripted, this is a forum for the progaming langue  java. java scripted  != java. 

I am moving this to html/webpage section.....

-----------------------------------
wtd
Mon Sep 20, 2004 3:54 pm


-----------------------------------
Create a textbox with HTML and gove it a unique ID.  Then simply access that object and set its value property.  Something like the following should work, though I haven't tested it.



   
      function displayTest() {
         document.getElementById("test-field").value = "Hello world!";
      }
   


   
      
   


