Details - Web 2.0 & AJAX :: Probelm while retriving values in drop-down

This thread was displayed: 3,018 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
Deepti
04-12-2006 09:47:46 GMT +2

 

Hi,

I am developing an application in Asp.net in which I am using Ajax.

I have two drop-down in my page(Country and State)and one text box(City).State values get populate on te basis of Country seleted.I am able to do this thing in AJax it is displaying properly.But I am facing problem If I want to Edit any City.When page gets load I am retriving the Country and State stored in the database.I am populating Country throgh Code-behind.First time when page gets upload I retrive the values of State through Code-behind.After that I am populating the values of State throgh Ajax method.On GUI level It is working properly Idislplay right states).If I will not change the country but change only state then I am able to save data.But if I change the country and State and click save button it will change the country values perfectly but doesn't take the new value of State seleted.It take the values of State when the page get uploaded first time.

I am not able to understad why is it behaving so.Is it happening so boz page is not refeshing.

Regards,

Deepti

Back | Reply | Quote | Top
Deepti
04-13-2006 10:22:16 GMT +2

Hello Deepti. I think that the best approach would be to let me have a look at the page, and after that I can give you some pointers on what I think is going on. Please give me either ftp access to your site and instructions / or the files and the necessary database structure. 

Thanks, 

Andrei.

Reply | Quote | Top
Chad Howell
07-02-2006 05:29:42 GMT +2

Hello,

I am new around here, but am having a similar problem with my AJAX / asp.net 2.0 application.  I am using AJAX to populate a drop down box depending on another ddb on the page.  Everything seems to be working fine.  I am getting the correct options in the ddb and things are good.   BUT, when I submit the form to the server side code, none of the values in the  'AJAX populated' ddb are available.  Even when I view source on the client page after AJAX has done it's work, the ddb options appear to be blank.  I have looked everywhere for anything helpful and have found nothing.  I appriciate any help. 

Chad

Reply | Quote | Top
Chad Howell
07-02-2006 05:33:38 GMT +2

It is me again.  Here is my AJAX code.  If anyone can see a problem here please advise.

function roleChange(){

var role = document.getElementById("ddlRole");

var url = "adminUsers.aspx?role=" + role.value;

createXMLHttpRequest();

xmlHttp.onreadystatechange = roleChange_CallBack;

xmlHttp.open("GET", url, true);

xmlHttp.send(null); }

 

function roleChange_CallBack(){

if(xmlHttp.readyState == 4) {

if(xmlHttp.status == 200) {

var response = xmlHttp.responseXML

for (var x=0; x<response.getElementsByTagName('nameCount')[0].childNodes[0].nodeValue; x++){

//Populate Department Name drop box

if (response.getElementsByTagName('name')[x].childNodes[0].nodeValue != null) {

addOption(document.form_edit_web_user.ddlDepartmentName, response.getElementsByTagName("name")[x].childNodes[0].nodeValue);

}}}}}

 

function addOption(selectbox,text)

{

var optn = document.createElement("OPTION");

optn.text = text;

optn.value = text;selectbox.options[selectbox.length] = optn;

}

</script>

 

Thanks again in advance.

 

Chad

Reply | Quote | Top
Sanket Banawalikar
10-17-2006 16:03:39 GMT +2

Hi Chad,

This is Sanket. I am also facing similar problem with the drop down list. Did you manage to find any solution for this. Your help on this is greatly appreaciated.

Thanks in advance.

Regards,

Sanket

Reply | Quote | Top
madhu kayam
03-25-2007 07:58:28 GMT +2

Hi deepti ,this is madhu....even I am developing an application in Asp.net in which I am using Ajax.I jus need ur help......i tried populating dropdown upon selecting another dropdown....but could not do it........can you help me sending the code for it which u did....awaiting for ur reply ........ i have very little time to get this work done.......

thanq deepthi in advance

madhu kayam

Reply | Quote | Top
Home > Support > Forums > Web 2.0 & AJAX > Details - Web 2.0 & AJAX
Adobe acquired InterAKT
InterAKT has been acquired by Adobe.
Learn more
 
© Adobe Systems Romania. All rights reserved.