﻿
//makes the other text field appear when "other" is selected

$("document").ready(function(){    
    if( $("select[id$='DdTlTitle']").attr("value") == "OTHER" ){
        $("input[id$='TbCtOther']").css("display","inline");
        $("#Trials1_TbCtOther2").css("display","inline");
    }else{
        $("input[id$='TbCtOther']").css("display","none");
        $("#Trials1_TbCtOther2").css("display","none");        
    };
    $("select[id$='DdTlTitle']").change(function(){
        if( $(this).attr("value") == "OTHER" ){
            $("input[id$='TbCtOther']").css("display","inline");
            $("#Trials1_TbCtOther2").css("display","inline");
            $("input[id$='TbCtOther']").attr("value","");  
        }else{
            $("input[id$='TbCtOther']").css("display","none");
            $("#Trials1_TbCtOther2").css("display","none");
            $("input[id$='TbCtOther']").attr("value",$(this).attr("value"));       
        };
    });
    if( $("select[id$='Industry']").attr("value") == "OTHER" ){
        $("input[id$='TbInOther']").css("display","inline");
        $("#Trials1_TbInOther2").css("display","inline");
    }else{
        $("input[id$='TbInOther']").css("display","none");
        $("#Trials1_TbInOther2").css("display","none");        
    };
    $("select[id$='Industry']").change(function(){
        if( $(this).attr("value") == "OTHER" ){
            $("input[id$='TbInOther']").css("display","inline");
            $("#Trials1_TbInOther2").css("display","inline");
            $("input[id$='TbInOther']").attr("value","");  
        }else{
            $("input[id$='TbInOther']").css("display","none");
            $("#Trials1_TbInOther2").css("display","none");
            $("input[id$='TbInOther']").attr("value",$(this).attr("value"));       
        };
        
        
    });
});




