The good news is that the original control name always seems to be preserved at the end of the control id ("always" -- I hope that's correct and so far it's been working). So by using jQuery's select[id$= syntax, here is a really simple way to handle this:
<script language="javascript" src="Images/jquery-1.2.1.pack.js"></script>
<script language="javascript">
$(document).ready(function(){
var ddlDate = $("select[id$='ddDateName']");
var txtStart = $("input[id$='txtDateStart']");
var txtEnd = $("input[id$='txtDateEnd']")
etc...
No comments:
Post a Comment