![]() |
view page source
I'm trying to debug the Javascript for a web page generator. I have set up a test page here that looks completely different in IE, Opera and Firefox.
Does anyone know how I can view the 'document' that is generated by the Javascript (using document.write() commands) which the browser uses to render the page? |
Re: view page source
Well I just captured it using a traffic analyser - but it's a bit too long to post.
|
Re: view page source
'Scuse me, but I'm not sure that that will tell us anything. The only thing that will be sent over the net are the raw files test.htm, test.js and test.css etc. I typed these in so I know what they look like! What I actually want is the 'document' that is created by the Javascript running on the client side. This isn't a server side script - it's hosted on ntlworld!
I'm not sure if it's possible to do this but I thought someone might know. |
Re: view page source
Is this what you mean?
This code is different than what I get when I just "View Source" from within IE, just get the "Sorry - you must enable Javascript to view this page" in IE. http://homepage.ntlworld.com/mikeyb/altis.htm |
Re: view page source
Brilliant - that's it!
What's more that looks very much like what IE must be using when it goes all screwy. How did you generate that MikeyB |
Re: view page source
Quote:
|
Re: view page source
Thanks to MikeyB I'm on the right road. Results here:
http://homepage.ntlworld.com/altisuk...ewich/test.htm (still got a bit of tidying to do but at least it works now) I'd still like to know how you generated that listing though. |
Re: view page source
Looks like he just did a right click and view source maybe? This is what happens in konqueror:
<html> <head> <title>A Test Page</title> <meta http-equiv="content-script-type" CONTENT="text/javascript"> <script src="test.js"></script> </head> <body> <script> page = new Array( 'c','a header', 'd','Saturday, 15th June 2003', 'l','3359','Adlington Morris Men', 'l','3365',"Martha Rhoden's Tuppeny Dish", 'p','3370','Shropshire Bedlams', 'l','3375','Stockport Morris Men', 'l','3377','Witchmen', 'p','3381','Ringheye Morris - with added ventilation!', 'l','3382','Waterson:Carthy', 'l','3386','Oyster Band', 's','4154','1285','584','Some yaks!', 'c','a footer') render(page) </script> <noscript>Sorry - you must enable Javascript to view this page</noscript> </body> </html> |
Re: view page source
Exactly the same happens in IE, Opera and Firefox. That is the raw contents of the HTML file. Most of it is just a Javascript array definition (this will be different on other pages).
What I am after is the HTML code that is generated by the line 'render(page)'. I can obviously view the results but I cannot work out how to view the text version that MikeyB has produced. |
Re: view page source
Oops. Sorry, missed this thread.......
Anyway, how I got the gerenrated source code was using a tool called Web Sleuth from http://sandsprite.com/Sleuth/ It's a set of little tools that adds itself into IE, some on the toolbar, some on the right-click menu. One of the options on the right-click menu is "Edit Source" and it shows you the all source as run/compiled whatever! |
Re: view page source
Brilliant, thanks MikeyB :)
|
| All times are GMT. The time now is 21:24. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum