473,511 Members | 15,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DOM cant raed ajax response

11 New Member
Hello I had tried so many times but still finding the solution,The Problem is when we use AJAX and get HTML as response,the same response not shows in DOM,Issue is when we try to use response html for further use,It wouldn't be available for some manipulation oj JS call.
Aug 27 '10 #1
10 1654
TheServant
1,168 Recognized Expert Top Contributor
Please include some code (in [code] tags) so we can see what you're doing.
Aug 27 '10 #2
neeleshv
11 New Member
Expand|Select|Wrap|Line Numbers
  1. $("input[name='destination[]']").click(function () {
  2.     # some statement
  3.     }
  4.     ) 
  5.  
  6. <body>
  7. <div id="xyz">
  8.  <input type="checkbox" name="destination[]" value =100"></div>
its working fine.Now when I append more element
Expand|Select|Wrap|Line Numbers
  1. <input type="checkbox" name="destination[]" value =100">
using AJAX then click on same checkbox the operation doesn't working.
Aug 27 '10 #3
neeleshv
11 New Member
Have any idea folk?
Aug 27 '10 #4
TheServant
1,168 Recognized Expert Top Contributor
This is an AJAX problem I think. I don't see any PHP.

Also, you need to close your [code ] tag's with [/code]
Aug 27 '10 #5
neeleshv
11 New Member
Thanks dude,But I have done so many time AJAX,So I have Experience in AJAX.Also when u use AJAX response in ur HTML page and then see the view source(FF),You can't see the response HTML.Do u have idea about this?
Aug 29 '10 #6
Dormilich
8,658 Recognized Expert Moderator Expert
any changes by JavaScript don't show up in the HTML source.
Aug 29 '10 #7
neeleshv
11 New Member
What do u mean by "any changes by JavaScrip" .I am using ajax response as a html in a div inner html. Now see what,u can not find the same response.
Aug 30 '10 #8
Dormilich
8,658 Recognized Expert Moderator Expert
that was an answer to:
Also when u use AJAX response in ur HTML page and then see the view source(FF),You can't see the response HTML.
JavaScript doesn’t interact with the source code (Ctrl+u in FF), it interacts with the document tree.

I’m not very familiar with jQuery/prototype, but if you have 2+ elements in your access result, you should use .click() on every element, not the returning list.
Aug 30 '10 #9
neeleshv
11 New Member
Thanks for ur time,But still I am not solved my problem.
Aug 30 '10 #10
Dormilich
8,658 Recognized Expert Moderator Expert
try
Expand|Select|Wrap|Line Numbers
  1. alert($("input[name='destination[]']"));
if that gives a NodeList/HTMLCollection or Array you need to apply your .click() handler on each element.
Aug 30 '10 #11

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

Similar topics

12
22324
by: petermichaux | last post by:
Hi, In my browser, I make an AJAX request. The server sends me a fragment of an HTML document. That fragment has some JavaScript inside some script tags. How do I run these scripts when the...
1
1448
by: GSlusarek | last post by:
Hi all. I made AJAX call which return me a piece of javascript code. I trying to execute that code and I get that some global variables are not accesible. I mean i use prototype library and when i...
4
7447
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
10
4828
by: trpost | last post by:
I am using ajax / php where I am looking up some info from the database and populating a select list dynamically, however I am running into some sort of size limitation with the ajax.response...
1
2483
by: dan.goyette | last post by:
I'm fairly new to using AJAX. I'm currently developing a data grid application in coldfusion, using AJAX for paging/filter/sorting updates to the grid. So far I've just been returning raw html, and...
2
2504
by: FrogBunz | last post by:
Is there a way to execute inline javascript code from within an AJAX response? I use AJAX to retrive a JSP page that is loaded using a database bean. One of the form elements is a select that I...
1
1787
by: maildmz | last post by:
Goodafternoon, I have got a minimum Mongrel instance running (see ruby code) and i am hitting it with an Ajax request using Prototype. (see javascript code) I get the 'onLoading' event, but...
3
2624
by: Bodyloss | last post by:
Hey all Ive ran into a bit of a problem when trying to parse multiple lines of javascript whitch are returned from an ajax request. On the main page where the request orginates, i have a <div...
1
2938
by: gigitek | last post by:
In my first php file I have a table with multiple rows and form fields. When the user selects a category I call a second php file which returns new rows (<tr>) which have to be added to the table...
3
3360
by: pablosuk78 | last post by:
Dear coders, I'm facing a problem and after few research I found that many ppl were looking around for the same solution, hope someone more expert than me could give a good help. I created an...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7371
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,...
0
7432
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...
0
7517
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...
0
4743
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...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1583
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 ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.