calling onchange event of a dropdown list when page refresh and pageload

Posted by Praveen7k under ASP.NET on 6/13/2011 | Points: 10 | Views : 4444 | Status : [Member] | Replies : 1
Has a dropdownlist on page with onchange="hideControls(this.value) depending on the user selected values the controls will visible and be hidden

here is function

function hideControls(ddid)
{
// to hide and show onchange
switch
case ' FirstName':
break;
case ' DOB':
break;
default:
break;

}
when i refresh the page and on pageload i am trying to call this function and switc case to default...how to do this..thanks
i didn't wrote all the code here...i wrote just sample, just i need to know how to call default in switch case........how to pass that value on page refresh and page load..i am not getting that




Responses

Posted by: Sksingh on: 6/13/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Praveen,

You can use javasript function to call onChange event whenever page get refresh.

dropdownlist.Attributes.Add("OnChange", "SetValue('PassParameters')")


and same function u can implement in javascript.

Regards,
Sunil

Praveen7k, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response