473,508 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Viewing Javascript generated source?

Hi all,

I've a HTML page (self-authored!) which has a lot of embedded
Javascript.

View-source in any major browser I've tried (Konqueror, Opera,
Mozilla, IE) shows the source code as retrieved from the HTTP server.
Which is what you'd expect.

Is it possible to view the source as generated by the Javascript, in
the context of the page as a whole? So instead of seeing:

<html>
<body>
<script>document.write("Hello World!");</script>
</body>
</html>

I'd like to see:

<html>
<body>
Hello World!
</body>
</html>

Obviously, this is a contrived example. The Javascript in question
uses conditional statements, and variables, so it's not merely a
simple matter of reading the document.write() calls.

Many thanks,
Paul.
Jul 20 '05 #1
6 7229
Paul wrote:
Hi all,

View-source in any major browser I've tried (Konqueror, Opera,
Mozilla, IE) shows the source code as retrieved from the HTTP server.
Which is what you'd expect.

Is it possible to view the source as generated by the Javascript, in
the context of the page as a whole?


View source in Netscape 4.

Andrew Graham
Jul 20 '05 #2
On 14 Nov 2003 13:22:32 -0800, pg*****@orbism.com (Paul) wrote:
Hi all,

I've a HTML page (self-authored!) which has a lot of embedded
Javascript.

View-source in any major browser I've tried (Konqueror, Opera,
Mozilla, IE) shows the source code as retrieved from the HTTP server.
Which is what you'd expect.

Is it possible to view the source as generated by the Javascript, in
the context of the page as a whole? So instead of seeing:

<html>
<body>
<script>document.write("Hello World!");</script>
</body>
</html>

I'd like to see:

<html>
<body>
Hello World!
</body>
</html>


I seem to remember browsers used to do that, but notice they don't
anymore. I guess you gotta find an older version browser and do it....
Jul 20 '05 #3
Jane Withnolastname wrote:
On 14 Nov 2003 13:22:32 -0800, pg*****@orbism.com (Paul) wrote:

Hi all,

I've a HTML page (self-authored!) which has a lot of embedded
Javascript.

View-source in any major browser I've tried (Konqueror, Opera,
Mozilla, IE) shows the source code as retrieved from the HTTP server.
Which is what you'd expect.

Is it possible to view the source as generated by the Javascript, in
the context of the page as a whole? So instead of seeing:

<html>
<body>
<script>document.write("Hello World!");</script>
</body>
</html>

I'd like to see:

<html>
<body>
Hello World!
</body>
</html>


I seem to remember browsers used to do that, but notice they don't
anymore. I guess you gotta find an older version browser and do it....

Mozilla => "select all" => "right-click" => "view selection source"

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #4
Paul wrote:
Is it possible to view the source as generated by the Javascript, in
the context of the page as a whole? So instead of seeing:


Mozilla DOM Inspector can do it.

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #5
Sometime around 14 Nov 2003 13:22:32 -0800, Paul is reported to have
stated:

I've a HTML page (self-authored!) which has a lot of embedded
Javascript.
<snip> Obviously, this is a contrived example. The Javascript in question
uses conditional statements, and variables, so it's not merely a
simple matter of reading the document.write() calls.


I see others have given you various solutions, but the question still
remains: why are you doing it with Javascript at all? You have a fallback
for the ~15% who have Javascript disabled/unavailable, of course?

Without a URI, I don't know what you are trying to achieve, but I would
hazard a guess that server-side scripting would be a better solution. It
would solve your problem of viewing the source, too.

Either that or you may need to rethink the design.

HTH

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 20 '05 #6
Roland
3 New Member
Hello, you can see generated javascript source with the tracer tool

http://www.netamo.com/tracer

It processes the page as the browser does, and traces every function. Check it
May 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2703
by: quikquic | last post by:
Suppose I download a html file with javascript in it, for example, <html> <body> <script language="JavaScript"> document.write("Hello"); </script> </body> </html>
1
3606
by: Neil Morris | last post by:
Hi I was wondering if there was a way to view the html code that javascript produced since viewing the source code shows the javascript if statements for netcrape and IE etc. thanks Neil...
6
2901
by: dark.peony | last post by:
Hi, (--1--) I'm trying to find a way to jump to a link (<a href="ref"></a>) in a page that is generated with javascript. The source view of the page only shows the javascript methods. The...
3
2136
by: Nathan Gilbert | last post by:
I am wanting to use javascript to select between different *.css files dependent on the user's browser. I am also wanting to generate the html document containing this javascript dynamically using...
3
1440
by: Michel Firholz | last post by:
Hi Group experts, i would like to tweak a javascript diashow with a bit SEO. No spamming, just ensuring the images are found. If the visitor is googlebot, it should not present the diashow, but...
3
9636
by: jonnyblazed | last post by:
Okay..... I'm gonna sum up what I want to do cause it will make it pretty simple for you guys to understand. Here we go: I have a form that posts data to a PHP mailer page I have created. When...
4
1441
by: Eric Layman | last post by:
HI, Im on dotnet 1.1 I've generated extra checkboxes, textboxes via client side javascript: eg: var inputElement = document.createElement('input'); inputElement.setAttribute('type',...
1
2311
by: Ben Brown | last post by:
I'm having some problems.. I have some javascript generated input elements with dynamic names and values. ex: <input name = "t1Name" .../> <input name = "t2Name" .../> ..... <input name =...
7
3189
by: Arsale | last post by:
I am trying to pass a javascript variable to php on javascript generated page, but on the new page I got only "Array". Where did I go wrong? On first page, i've got image map with areas....
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.