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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting source code into a variable 1

Status
Not open for further replies.

jonthequik

Programmer
Aug 6, 2000
40
0
0
US
I am trying to figure out if there is a way in JavaScript to get the source code out of a page, and into a variable. I know that you can get the code with a button value of "view-source: but I need it to load into a variable instead of an editor.

Any ideas? Jonathan Hannan
Computer Repair, Webdesign
HTML, CGI, PERL, JavaScript, XML
 
most meta tags (not all of em):

document.all.tags("META")[0].getAttribute("name")
document.all.tags("META")[0].getAttribute("content") jared@aauser.com
 
yeah!! and now to put this thread to sleep:

document.all.tags("HTML")[0].outerHTML

the whole document. jared@aauser.com
 
so, now the only thing missing are linked stylesheets and included js files.
 
which we can get the names of, but not the actual contents, unfortunately (as far as I know)... jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top