Posted: Tue Nov 09, 2004 5:36 pm Post subject: active textfield question
i have more than 1 textfield on a page at one time and i want to output something to the textfield that is active at that particular time...
can someone please tell me what the code is to do that? maybe there's a command to get the status of the textfield (active or innactive i mean)
thanks!
Sponsor Sponsor
Blade
Posted: Sun Nov 14, 2004 12:45 am Post subject: (No subject)
use javascript... and please try to be clearer when asking a question cuz i dont really know what you mean...
if your page has multiple forms, then change the number in "forms[0]"
forms are stored in an array, obviously the first form on the page will be the 0th element in the array...
AND i'm not sure what yer askin so.. this one will update the second box with whatever is in the first box...
code:
<head>
<script language="JavaScript">
<!--
function changevalue(){
var field = document.forms[0].secondfield;
var firstfield = document.forms[0].firstfield;
field.value = firstfield.value;
}
-->
</script>
</head>