Monday, October 8, 2007

DropDownList Selected Item - With Javascript

This code will help you to get text value from dropdownlist object

function ShowPPSalesmanUniformImage()
{
var ddlUnifDistributionCode = document.getElementById("ddlUnifDistributionCode");
// mengambil dropdown text dengan javascript
var strVal = ddlUnifDistributionCode.options[ddlUnifDistributionCode.selectedIndex].text;
showPopUp('../PopUp/PopUpSalesmanUniformImage.aspx?Distribution='+strVal,'',500,760,'');
}

No comments: