Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML data

Status
Not open for further replies.

jerzyg

Programmer
Dec 26, 2007
2
PL
Hi,

I have URL address: When I type this address in firefox, I get xml displayed inside the browser window.
How can I get HTML data output ?
I try this inside java script:

function getData() {
var data = window.open(" var doc = asims.document;
alert ("DATA:" + doc.body.innerHTML);
asims.close();
asims.opener = self;
}

However it does not work, alert DATA shows empty data.


Thanks in advance for help

Jerzy
 
However it does not work, alert DATA shows empty data.

Perhaps it's because doc contains nothing:
Code:
var doc = asims.document;

You're defining doc as asims.document, but I don't see anywhere in your code where asims is defined.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
It is:
doc = data.document;
it does not work.

 
NO - Kaht is right. You do not have asims defined to anything (at least not in the code you posted)

Please review your post and clean it up so that you define all your variables.

In your first post you have
doc=asims.document
In your second post you have
doc=data.document
So I am getting just a little confused, and I really don't want to assume because then I usually get it wrong.

Einstein47 (Starbase47.com)
“Never put both feet in your mouth at the same time.
Because then you won't have a leg to stand on.“

- Unknown
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top