|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Does anyone know how to output text to a textbox inside a form? I've tried document.formName.boxName.write("text"); and document.boxName.write("text"); but neither works.
|
|
#2
|
|||
|
|||
|
you are confusing js methods with form properties.
most form objects have a value property that you can set = to your value. here is a quick sample form you can cut and paste <HTML><HEAD> <script language="javascript"> function init(){ frm.text1.value="this is a test"; } </script> </HEAD> <BODY onload="init()"> <form name="frm" id="frm"> <INPUT type="text" id="text1" name="text1"> </form> </BODY> </HTML> |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Output text to textbox |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|