When drop down list value changes

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.
 
M

Michael Nemtsev, [MVP]

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>
 
V

Valli

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;

}

}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top