When drop down list value changes

  • Thread starter Thread starter Valli
  • Start date Start date
V

Valli

HI,

I have a drop down list in my aspx page. When the list1 value changes, a
procedure GetList2Values ( onchange="GetList2Values ()" ) will get executed.
Since the list2 contains a large number of data, I need to provide a status
'Loading...' in another label . After loading completed, the status label
becomes empty. I write this label updation in GetList2Values procedure. But
it didnt work. Tha label didnt get updated. Is there any way to update this
label?

GetList2Values is written in javascript.
 
Hello Valli,

Did you update your label via JavaScript code?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


V> HI,
V>
V> I have a drop down list in my aspx page. When the list1 value
V> changes, a procedure GetList2Values ( onchange="GetList2Values ()" )
V> will get executed. Since the list2 contains a large number of data, I
V> need to provide a status 'Loading...' in another label . After
V> loading completed, the status label becomes empty. I write this label
V> updation in GetList2Values procedure. But it didnt work. Tha label
V> didnt get updated. Is there any way to update this label?
V>
V> GetList2Values is written in javascript.
V>
 
Hi Michael,

This is the code that I have used for filling up the second dropdown
list. I have updated the 'lblDis' label for Loading.. text.

Please let me know if any wrong in my codings..

function FetchUnderlyingValue()

{

if (xmlHttpReq.readyState == 4)

{

if (xmlHttpReq.status == 200)

{

var i =0;

var xmldoc = xmlHttpReq.responseText;

var objtotal =xmldoc.split("$$END$$");

var objQuery =objtotal[0].split(",");

document.getElementById('<%=lblDis.ClientID%>').value = "Loading.." ;

for (i=0; i<=objQuery.length -2;i++) //-2 is given since to remove an empty
line at the end in combo box.

{

var ddlnameandvalue =objQuery.split("#");

optioni = new Option(ddlnameandvalue[0],ddlnameandvalue[1]);

document.aspnetForm.<%=UnderlyingDropDownList.ClientID%>.options =
optioni

}

document.getElementById('<%=lblDis.ClientID%>').value = "";

GetSecurityValues() //Fill the security dropdown list

i =null;

}

}

}
 
Back
Top