boatdrinks
IS-IT--Management
I know this is wrong, I am trying to set the text 'DTP' appear in textbox insertbarcde only if index 1 is selectedfrom dropdown inserthardware. How should this code look?
<SCRIPT LANGUAGE=javascript>
<!--
function OnChange(dropdown)
{
var myindex = inserthardware.selectedIndex
If myindex == 1
insertbarcode.Attributes.Add("onfocus",@"if (this.value == '') {this.value = 'DTP';}";
end if;
return true;
}
//-->
<SCRIPT LANGUAGE=javascript>
<!--
function OnChange(dropdown)
{
var myindex = inserthardware.selectedIndex
If myindex == 1
insertbarcode.Attributes.Add("onfocus",@"if (this.value == '') {this.value = 'DTP';}";
end if;
return true;
}
//-->