|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
text on the fly
i want to display next to certain form elements some text (yess or no)
noting complex just if a check box is clicked (on click java function call) Write bla if not write something rlse, how would i go about that Code:
<table border="0"> <TR> <TD valign="top"><B>A US Citizen: </B></TD> <TD valign="top"><INPUT type="checkbox" name="US_Citizen" onClick="javascript:Yes()"></TD> </TR> </table><BR> |
|
#2
|
|||
|
|||
|
RE: text on the fly
[code]
<table border="0"> <TR> <TD valign="top"><B>A US Citizen: </B></TD> <TD valign="top"><INPUT type="checkbox" name="US_Citizen" onClick="javascript:Yes()"> ::Yes/No Text here::</TD> </TR> </table><BR> [code] |
|
#3
|
|||
|
|||
|
RE: text on the fly
you mean you want to have the text boxes display text after you check a checkbox by way of a javascript function? First you hav to give the javascript target a name. Say my textfield is named "blah" and my form name is "foo". In my Javascript function, I would write it to the text field like so:
document.foo.blah.value = "Value goes here"; it follows the format of document.formname.elementname.value |
|
#4
|
|||||
|
|||||
|
RE: text on the fly
im still rather new to java, (ha i 'mastered' php before Java, lol) would i have ot use a name filed on my form to name my form?
php Code:
|
|
#5
|
|||
|
|||
|
RE: text on the fly
<!--
//---Quick interjection--- thats not java, its javascript. Both are different enough to notice //---End Interjection----> Yes, its always a good idea to name your forms when dealing with something objective. |
|
#6
|
|||
|
|||
|
RE: text on the fly
|