Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Javascript problem with IE.... HELP PLEASE.

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

view page source
Reply
 
Thread Tools
Old 08-06-2004, 23:23   #1
altis
Inactive
 
altis's Avatar
 
Join Date: Jun 2003
Location: Warrington ntl:81304 Altitude: 12m (and falling)
Posts: 4,499
altis has a nice shiny staraltis has a nice shiny star
altis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny star
Question 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?
altis is offline   Reply With Quote
Advertisement
Old 09-06-2004, 00:56   #2
Paul
Dr Pepper Addict
Cable Forum Admin
 
Paul's Avatar
 
Join Date: Oct 2003
Location: Nottingham
Age: 63
Services: Zen & YouFibre FTTP, Sky Q TV, Sky Mobile, Flextel SIP
Posts: 31,312
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Re: view page source

Well I just captured it using a traffic analyser - but it's a bit too long to post.
__________________

Baby, I was born this way.
Paul is offline   Reply With Quote
Old 09-06-2004, 08:59   #3
altis
Inactive
 
altis's Avatar
 
Join Date: Jun 2003
Location: Warrington ntl:81304 Altitude: 12m (and falling)
Posts: 4,499
altis has a nice shiny staraltis has a nice shiny star
altis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny star
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.
altis is offline   Reply With Quote
Old 09-06-2004, 09:18   #4
MikeyB
Inactive
 
MikeyB's Avatar
 
Join Date: Jun 2003
Location: Swindon
Age: 54
Services: BT FTTP, Humax Foxsat HDR Freesat+
Posts: 810
MikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud of
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
MikeyB is offline   Reply With Quote
Old 09-06-2004, 09:38   #5
altis
Inactive
 
altis's Avatar
 
Join Date: Jun 2003
Location: Warrington ntl:81304 Altitude: 12m (and falling)
Posts: 4,499
altis has a nice shiny staraltis has a nice shiny star
altis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny star
Thumbs up 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
altis is offline   Reply With Quote
Old 09-06-2004, 09:48   #6
Paul
Dr Pepper Addict
Cable Forum Admin
 
Paul's Avatar
 
Join Date: Oct 2003
Location: Nottingham
Age: 63
Services: Zen & YouFibre FTTP, Sky Q TV, Sky Mobile, Flextel SIP
Posts: 31,312
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Re: view page source

Quote:
Originally Posted by altis
'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!
ok, sorry.
__________________

Baby, I was born this way.
Paul is offline   Reply With Quote
Old 10-06-2004, 23:20   #7
altis
Inactive
 
altis's Avatar
 
Join Date: Jun 2003
Location: Warrington ntl:81304 Altitude: 12m (and falling)
Posts: 4,499
altis has a nice shiny staraltis has a nice shiny star
altis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny star
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.
altis is offline   Reply With Quote
Old 10-06-2004, 23:37   #8
Strzelecki
Inactive
 
Join Date: Jan 2004
Location: Essex
Age: 43
Services: 80/20Mbps FTTC on Freeola
Posts: 871
Strzelecki has reached the bronze age
Strzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze age
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>
Strzelecki is offline   Reply With Quote
Old 11-06-2004, 08:32   #9
altis
Inactive
 
altis's Avatar
 
Join Date: Jun 2003
Location: Warrington ntl:81304 Altitude: 12m (and falling)
Posts: 4,499
altis has a nice shiny staraltis has a nice shiny star
altis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny star
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.
altis is offline   Reply With Quote
Old 10-07-2004, 14:11   #10
MikeyB
Inactive
 
MikeyB's Avatar
 
Join Date: Jun 2003
Location: Swindon
Age: 54
Services: BT FTTP, Humax Foxsat HDR Freesat+
Posts: 810
MikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud ofMikeyB has much to be proud of
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!
MikeyB is offline   Reply With Quote
Old 11-07-2004, 21:19   #11
altis
Inactive
 
altis's Avatar
 
Join Date: Jun 2003
Location: Warrington ntl:81304 Altitude: 12m (and falling)
Posts: 4,499
altis has a nice shiny staraltis has a nice shiny star
altis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny staraltis has a nice shiny star
Re: view page source

Brilliant, thanks MikeyB
altis is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:46.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum