Hello folks.
I am new to all of this so please be gentle! Ok, currently I have the following scenario.
I have three methods of searching for product details:
A cascading drop down list (ddlbuyer, ddlSub, ddlProd) and an associated radiobutton (radProd)
An autocomplete textbox that searches for product information (txtPrdAC)
A product list search whereby a user enters the number of items they wish to see (txtHowMany) and then specifies which sub category they wish to see (radTopx)
What I would ideally like to have is the following situation.
A user can only use one of the methods of searching for products as list above. If they click on the first ddl then any data that may be present in the text boxes is cleared. Similarly if they click on the txtPrdAC or txtHowMany, any information that was present in the ddl list is cleared and the return back to it's original, default value.
I would like to do this in c# code behind and have so far got the following code that is working...ish! Well, it sets the focus of the radio button anyway.
ddlProd.Attributes.Add("onchange", "return SetRadioFocus('"
+ radBuyer.ClientID + "');");
radTopx.Attributes.Add("onclick", "return SetRadioFocus('"
+ radTopx.SelectedItem + "');");
tbxProdAC.Attributes.Add("onclick", "return SetRadioFocus('"
+ radProd.ClientID + "');");
ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", @"
function SetRadioFocus(target)
{
document.getElementById(target).checked = true;
}", true);
However, I am still missing certain aspects i.e. the cleainr the text boxes and or ddl. Again, apologies for the ignorance, but this has thrown me. Thank you for any assistance that may come my way.