Hello all
I have honestly tried several different avenues from google on this erro but I am hitting my head against a brick wall.
I have this bit of jquery in my code behind:
tbxProdAC.Attributes.Add("onclick", "$('radProdAC.ClientID').attr('checked', true); $('ddlBuyer.ClientID').val('--Choose Buyer--'); $('ddlSub.ClientID').val('--Choose Sub Category--'); $('ddlProd.ClientID').val('--Choose Product--');");
However, whenever I click on the textbox, with debugging switched on, I received the above error on the following line:
<input name="ctl00$ContentPlaceHolder1$tbxProdAC" type="text" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$tbxProdAC\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ctl00_ContentPlaceHolder1_tbxProdAC" class="completionList2" onclick="$('radProdAC.ClientID').attr('checked', true); $('ddlBuyer.ClientID').val('--Choose Buyer--'); $('ddlSub.ClientID').val('--Choose Sub Category--'); $('ddlProd.ClientID').val('--Choose Product--');" style="z-index: 1; left: 200px; top: 475px; position: absolute; height: 20px; width: 345px;" />
Now ctl00$ContentPlaceHolder1$tbxProdAC doesn't really 'exist. This is a control that is on a content page within a content place holder.
How do I go about ensuring that the jquery reconciles with the correct ID or how do I ensure that the content place holder does not amend the original control ID?
Any help greatly received as I am going mad trying different things!