473,804 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

creating a Ajax dynamic list

30 New Member
Hello,
I am new in Ajax. I want to create Ajax dynamic list with ASP and XML. can anybody will help me regarding This.

Thanks in advance..
Mar 27 '08 #1
6 2591
aswath
18 New Member
Hello,
I am new in Ajax. I want to create Ajax dynamic list with ASP and XML. can anybody will help me regarding This.

Thanks in advance..

r u finding problem in sending a request itself or u can get the response however facing problem in creating dynamic list box options........
regards
Mar 27 '08 #2
r035198x
13,262 MVP
Hello,
I am new in Ajax. I want to create Ajax dynamic list with ASP and XML. can anybody will help me regarding This.

Thanks in advance..
What have you done so far?
Mar 27 '08 #3
dasrasmikant
30 New Member
r u finding problem in sending a request itself or u can get the response however facing problem in creating dynamic list box options........
regards
My problem is how to disply individually records in the div element
Mar 27 '08 #4
aswath
18 New Member
My problem is how to disply individually records in the div element
hi dasrasmikant,
div elements??? do u want to create <option> tags dynamically?SO that u can have u resultant data in another combo box... if yes i can send u the code for that....
regards.......
Mar 28 '08 #5
dasrasmikant
30 New Member
hi dasrasmikant,
div elements??? do u want to create <option> tags dynamically?SO that u can have u resultant data in another combo box... if yes i can send u the code for that....
regards.......
Thanks aswath
Actually I want to show the data in a div like in http://www.answers.com/
Mar 28 '08 #6
aswath
18 New Member
Thanks aswath
Actually I want to show the data in a div like in http://www.answers.com/

ur url is aint woriking.
the below code can be used to create dynamic listbox options..
this code ll be useful if i have understood ur question properly.......
Expand|Select|Wrap|Line Numbers
  1. xmlHttp.onreadystatechange=function()
  2.                                             {
  3.                                                 if(xmlHttp.readyState==4){
  4.                                                     status_name = xmlHttp.responseText;
  5.  
  6.  
  7.                                                     if ((status_name=="") || (status_name==null))
  8.                                                         {
  9.                                                             removeOptionLast2();
  10.  
  11.                                                         }
  12.                                                         else
  13.                                                             {
  14.                                                                 removeOptionLast2();
  15.  
  16.                                                                 var col_array1=status_name.split("/");
  17.                                                                 //                        alert(col_array[0]);
  18.                                                                 var part_num1=0;
  19.  
  20.                                                                 while (part_num1 < col_array1.length)
  21.                                                                     {
  22.  
  23.                                                                         var a=document.createElement('option');
  24.  
  25.                                                                         a.text=col_array1[part_num1];
  26.                                                                         a.value=col_array1[part_num1];
  27.  
  28.                                                                         var b=document.getElementById("modify_status_name");
  29.                                                                         try
  30.                                                                         {
  31.                                                                             b.add(a,null); // standards compliant
  32.                                                                         }
  33.                                                                         catch(ex)
  34.                                                                         {
  35.                                                                             b.add(a); // IE only
  36.                                                                         }
  37.  
  38.  
  39.  
  40.                                                                         part_num1+=1;
  41.                                                                     }
  42.  
  43.                                                                 }
  44.  
  45.  
  46.                                                             }
  47.                                                         }
regards
Mar 28 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1742
by: Ex-Em-El | last post by:
I have a problem in creating a dynamic table in the same xml : 1.xml: <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="2.xsl"?> <aaa xmlns="http://tempuri.org/My.xsd"> <ppp> <po>
1
1527
by: Rob Venable | last post by:
Hi, Does anyone know the syntax for creating a dynamic radio button from a Javascript function. I think it's something like: var btn = new radio( some arguments ); but I don't know the arguments or if this is even right. Any help would be appreciated. Thanks
11
11773
by: tara99 | last post by:
I was wondering if can some help me with creating a dynamic list box. I have a combobox with the list of items (item1, item2, item3). item1 has 5 sub items item2 has 10 sub items item3 has 2 sub items I want the size of the list box to change depending on the number of sub items available. I hope this is clear.
2
5696
by: Milsnips | last post by:
hi there, i'm creating a dynamic menu system for a CMS website application. What i am currently doing is the following: in a function called LoadMenu(), i loop through the required db records and add the menus on the fly, however because its not known which folder level the page will be on, i need to use a <asp:hyperlinkcontrol so i can use the navigateUrl="~/...." functionality, whilst still programaticallly creating the...
1
2930
by: empiresolutions | last post by:
Hello fellow code junkies, I am using the "Ajax dynamic list" http://dhtmlgoodies.com/index.html?whichScript=ajax-dynamic-list and i think its the best out there. I have found a compatibility issue maybe one of you can help me out on. In this html i use a text field to collect info. when a user types, *ajax_showOptions()* shows the option perfectly. once an item is selected and i move from the field, *makeRequest()*, my set variable to...
1
4389
by: Allan Ebdrup | last post by:
I have a dynamic list of regular expressions, the expressions don't change very often but they can change. And I have a single string that I want to match the regular expressions against and find the first regular expression that matches the string. I've gor the regular expressions ordered so that the highest priority is first (if two or more regular expressions match the string I want the first one returned) The code that does this has...
2
2178
by: pralhadkulkarni12 | last post by:
Hi, I am a new user of AJAX. I need to generate suggest list for every input given by user as we get in Google. To generate I need AJAX code which will read data following XML file. e.g. <?xml version="1.0" ?> <company> <turnover> <year id="2000">appi</year> <year id="2001">archana</year>
1
3754
by: skyson2ye | last post by:
Hi, guys: I have written a piece of code which utilizes Javascript in PHP to create a three level dynamic list box(Country, States/Province, Market). However, I have encountered a strange problem, and I have spent three days trying to debug but to no avail. Everything is OK when there are only two dependent list boxes, but when adding the third child list box, a problem appears: if I populate the third box only with the value: new...
4
2257
by: raknin | last post by:
Hi, I am creating dynamic list in the server through php and insert it using ajax. for ajax I using the following statement: document.getElementById(list_name_id).innerHTML=xmlHttp.responseText ; until now everything is OK the list is builds correctly. but when I use the document.getElementById(call_list_id).options.value I got an error saing "value is null or it is not an object" It seems that object list ID is null. Although...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9166
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.