Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Retrieve XML attribute values with AJAX

Started 1 month ago by johnjmk
I need to retrieve the attributes from the "trans" elements and print them out into a table from the following XML: <mydata> <logon>Trans</logon> <trans date=\"01-02-2008\" incexp=\"Expense\" item=\"Food\" amount=\"100\">1001</trans> <trans date=\"01-22-2008\" incexp=\"Expense\" item=\"Shoes\" amount=\"123\">1002</trans> <trans date=\"01-31-2008\" incexp=\"Expense\" item=\"...
Site: IBM developerWorks : Java technology Forums  IBM developerWorks : Java technology Forums - site profile
Forum: Ajax forum   Ajax forum
 - forum profile
Total authors: 12 authors
Total thread posts: 6 posts
Thread activity: 4 new posts during last week
Domain info for: ibm.com

Other posts in this thread:

viji-cmrit replied 3 months, 2 weeks ago
Back to Thread List

DanRumney replied 3 months ago
Can you rephrase your question? I don't understand what you're asking.

Weesh replied 3 months, 1 week ago
hi, I am currently using an IFrame (in my jsp) to bring up a third party web content(ex.a payment page from www.hsbc.com). i want the external site to handle all the user actions (within the iframe). In this case I am unable to capture the errors or exception that the external website throws. Is there a way to bring up third party web content using Ajax with better error ...

DanRumney replied 3 months ago
Sorry, It's expressly forbidden to access the DOM of a page from a different domain, even if it's loaded in an IFRAME. This is known as a cross-domain or cross-site request. If you google those terms, you'll get a lot of information on the matter. Dan

wildhearts replied 3 months ago
Hello i'd like to know if the following can be done using ajax. im pretty much confident that i don't know what im talking about here which is why im hoping someone here will give me guidelines to achieving my goal id like to create an application that 1. searches and browses through pictures. 2. connects to my mobile and downloads pics to it 3. uploads pictures to a webserver ...

DanRumney replied 3 months ago
I'd suggest you learn an AJAX framework, such as Dojo, jQuery or Prototype. There are a lot of quirks and variations with Javascript and AJAX implementation over the various browsers; frameworks take some of the guesswork out of your implementation. You're going to need to do a fair amount of server work. As a result, you should look into web development frameworks such as JSPs (...

JoEdwards replied 3 months ago
Hi all I saw a similar post on this forum about a script running perfectly when an alert is placed in it, but the same script does not complete withour the alert. The original poster was Andy51488 and his query: 'Ajax won't complete without alert box - time problem? Posted: Mar 25, 2009 11:25:06 AM ...was answered by Dan Rumney. Dan (or anyone really), if you're out ...

DanRumney replied 3 months ago
Jo, First thing that occurs to me is that the code that you've posted is not the whole shebang. There's nothing in your code snippet which uses the variable 'picname'. As a result, I'm going to guess that what's happening is that you call 'picnameArray()' and then access 'picname' at some point shortly after that. Assuming I'm right, that's where your problem lies: 'picname' ...

JoEdwards replied 3 months ago
Hi Dan Thanks so much for your speedy response. The timing issue with the ajax request being asynchronous was my first thought too, but then having seen your solution to the previous post regarding this problem I thought perhaps I'd done something else wrong. You're spot on that I use the array 'picname' shortly after the XMLHttpRequest but unfortunately I can't use the data ...

DanRumney replied 2 months, 4 weeks ago
Back to Thread List

 

Top contributing authors

Name
Posts
DanRumney
7
user's latest post:
Ajax refresh problem~
Published (2009-12-03 13:58:00)
We'd need to know how b.php appears to the client, in order to help you here. Also, what behaviour are you seeing the the code that you have written and how does this differ from what you were expecting? Dan
tsuji
3
user's latest post:
Retrieve XML attribute values...
Published (2009-11-11 22:27:00)
amendment-2 Sorry for this major blunder when typing up reply. This line if (transNode!= null ) { should be read while (transNode!= null ) { Sorry for the confusion.
anilhkgooglewave
3
user's latest post:
ActiveXObject not found
Published (2009-12-02 15:48:00)
notes.txt (2.1 KB)
ngansamuel
2
user's latest post:
Ajax refresh problem~
Published (2009-12-03 23:46:00)
I do not suppose people will see my b.php page And i think the data that appears on the b.php page is very simple for example you will only see three values on it: 23000 1234 9876 like this! My website is a investment website, so i want to get each value on b.php page and put it on different position in a.php
meraj_zia
2
user's latest post:
a4j:mediaOutput size
Published (2009-12-07 12:38:00)
I used style instead and it worked.
johnjmk
1
user's latest post:
Retrieve XML attribute values...
Published (2009-11-10 06:40:00)
I need to retrieve the attributes from the "trans" elements and print them out into a table from the following XML: &lt;mydata&gt; &lt;logon&gt;Trans&lt;/logon&gt; &lt;trans date=\"01-02-2008\" incexp=\"Expense\" item=\"Food\" amount=\"100\"&gt;1001&lt;/trans&gt; &lt;trans date=\"01-22-2008\" incexp=\"Expense\"...
geminizebra
1
user's latest post:
In Need of Ajax Info from...
Published (2009-11-15 17:06:00)
Hi, everyone! I’m working on an entrepreneurship project and my group needs your help in figuring out some of the details. To give you the basic rundown of our project, our idea is to develop a new experience when shopping online. Instead of using the traditional, linear online storefront, customers will use a very user-friendly online web application (programmed with Ajax) to shop. We want to simulate the experience of physically shopping...
Ian Wojtowicz
1
user's latest post:
AJAX Inconsistencies
Published (2009-11-20 18:47:00)
Hi all. I'm having a hellish time trying to iron out cross-browser AJAX inconsistencies. My site ( http://woj.com/polish ) works fine on Safari and IE8, but only intermittently on Firefox and Chrome. Does anyone know what might be happening? Thanks. Ian
murray9654
1
user's latest post:
why is the word Asynchronous used?
Published (2009-11-22 23:26:00)
Hi I am new to ajax and i have a basic doubt? AJAX mean Asynchronous java script. why is the word Asynchronous used? what exactly does it mean? thanking you in advance.
rash799
1
user's latest post:
double drop down list
Published (2009-12-01 17:22:00)
Im trying to make a drop down list which when selected brings up another drop down list and then that drop down list lets you select something as well. The first drop down list works but the second one does not?? Can someone please help me I am new to Ajax and have spent ages with this with no results. Does anyone know a good tutorial or I can post my code??

Related threads on "IBM developerWorks : Java technology Forums":

Related threads on other sites:

Thread profile page for "Retrieve XML attribute values with AJAX" on http://www.ibm.com/developerworks/java. This report page is a snippet summary view from a single thread "Retrieve XML attribute values with AJAX", located on the Message Board at http://www.ibm.com/developerworks/java. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity