Java Script Problem
-
Hi all, I have a problem in java script... in asp.net i have a repeater.. in that repeater i have some controls and a dropdownlist.... i am showing message if user select 0 index... function OnChangeDropDown( DropDown, DivError ) { alert (DropDown); alert (DivError); var DivError1 = document.getElementById( DivError ) if ( DropDown.value == "0" ) { DivError1.style.display = ''; DropDown.focus(); return false; } else { DivError1.style.display = 'none'; return false; } } *********************** Repeater Code :
Student Id
Student Name
Student Status
<%# Eval("student_id")%>
<%# Eval("Student_name")%>
-
Hi all, I have a problem in java script... in asp.net i have a repeater.. in that repeater i have some controls and a dropdownlist.... i am showing message if user select 0 index... function OnChangeDropDown( DropDown, DivError ) { alert (DropDown); alert (DivError); var DivError1 = document.getElementById( DivError ) if ( DropDown.value == "0" ) { DivError1.style.display = ''; DropDown.focus(); return false; } else { DivError1.style.display = 'none'; return false; } } *********************** Repeater Code :
Student Id
Student Name
Student Status
<%# Eval("student_id")%>
<%# Eval("Student_name")%>
-
hi, Thanks For Sending Me This... But My Problem Is How To Pass Two Control Id To Java Script Function... Suppose i Have a Java Script In Which It Validate Dropdown's 0 index onchange... the first parameter is 'this', means dropdown id but how to pass div id which is runat="server" my function function OnChangeDropDown( DropDown, DivError ) { var DivError1 = document.getElementById( DivError ) if ( DropDown.value == "0" ) { DivError1.style.display = ''; DropDown.focus(); return false; } else { DivError1.style.display = 'none'; return false; } } calling Style... onchange="return OnChangeDropDown(this,<%# DivError1.ClientID %>)" Now Problem is How To Pass ControlID IN Java Script Function....... Hope For The Best :confused: