(Type your message here)
--------------------------------
From: Siva sakthi
Hi,
I have populated the data from database in aspx page using template column.
I am getting dropdown list box value using javascript, when i click on the hyperlink.
this is the code to place the dropdown list in template column. this is fixed in all template column
<select name="DDownRatingModel">
<option name="Op1" value="CQ4">Current(Q4 04)</option> <option name="Op2" value="PQ3">Previous (Q3 04)</option> <option name="Op3" value="PQ2">2nd Prev (Q2 04)</option>
This is javascript source:
function fnTest()
{
var ratingSelect = document.frmBidDetails.DDownRatingModel;
if (ratingSelect.selectedIndex > -1)
{
var getSel=ratingSelect.options[ratingSelect.selectedIndex].text
alert(getSel);
}
}
The above code works well when i have only one dropdown list control. if there is more than one (Dynamic control) dropdownlist, makes the error "Undefined" in alert box.
Please clear my doubt as soon as possible.
Thanks.
Siva.
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>OZwDMHnw5kypbs4TzPJyRQ==</Id>