I have a parameter for a method, that should be a string and I can't come up with how to <% *.ClientID %> to the thing as a variable like that. Since its a variable i can't wrap it in quotes since it will be taken literally and when I use the parameter like a variable (as you're supposed to) i get an ASP error saying it doesn't exist in the context (reading it literally).
Any Clues?
thanks guys
Code Sample
function next(currentControl, maxLength, nextControl) {
if (document.getElementById( currentControl<%=.ClientID %>).value.length >= maxLength) {
document.getElementById( nextControl<%=.ClientID %>).focus();
}
return false;
}
Call Sample
wValCode.Attributes.Add("onkeyup","next('wValCode','3','wValThree')");
I know probably a primitive way of adding the attribute, but its how it was explained to me. I picked up ASP on the fly so don't be too hard on me ;)
Static HTML
<input name="ctl00$ContentPlaceHolder2$wValThree" type="text" id="ctl00_ContentPlaceHolder2_wValThree" style="width:33px;">
That is the only related reference I can find in the static html. Would it have been added in one of ASPs convoluted js files?