473,327 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

get html generated by javascript

If there is javascript in a html file, for example,

<html>
<body>
<script language="JavaScript">
document.write("Hello");
</script>
</body>
</html>

How can I can get the pure html generate by javascript,

<html>
<body>
Hello
</body>
</html>

I am looking for a c++ solution.

Thanks, qk
Jul 20 '05 #1
7 5030
qu******@yahoo.com wrote:
If there is javascript in a html file, for example,

<html>
<body>
<script language="JavaScript">
document.write("Hello");
</script>
</body>
</html>

How can I can get the pure html generate by javascript,

<html>
<body>
Hello
</body>
</html>
<script language="JavaScript">
document.write('<html>');
document.write('<body>');

etc.
I am looking for a c++ solution.


I don't get this part.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
qu******@yahoo.com wrote something that suggests he should read:

http://www.cs.tut.fi/~jkorpela/usenet/xpost.html

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #3
On Thu, 18 Sep 2003 23:34:49 GMT, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
qu******@yahoo.com wrote:
If there is javascript in a html file, for example,

<html>
<body>
<script language="JavaScript">
document.write("Hello");
</script>
</body>
</html>

How can I can get the pure html generate by javascript,

<html>
<body>
Hello
</body>
</html>
<script language="JavaScript">
document.write('<html>');
document.write('<body>');


But is that a good idea? It means that someone without Javascript will
get a totally blank page. It seems to me a minimum requirement that
someone without Javascript at least gets a message pointing out that
Javascript is required for the page in question.

And in approximately 99% of cases a page can actually be rendered quite
acceptably without Javascript at all, if sensibly written, as the
Javascript is usually only used for a bit of decoration, and not for the
true content of the page at all. So the OP's first approach is the write
way ... er sorry, right way to go about it.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #4
"Stephen Poley" <sb*****@xs4all.nl> wrote in message
news:m9********************************@4ax.com...
<script language="JavaScript">
document.write('<html>');
document.write('<body>');


I took the OP message to mean: "how can I access the final generated HTML?"

If you're using IE, my thought is you could try copying the innerHTML of the
documentElement to the clipboardData object once the page has loaded. Check
out the following URL for more information on clipboardData, etc:
http://msdn.microsoft.com/library/de...ence_entry.asp

Jonathan
www.snook.ca
Jul 20 '05 #5
In article
<ik*******************@news02.bloor.is.net.cable.r ogers.com>,
"Jonathan Snook" <go***************@snook.ca> wrote:
<script language="JavaScript">
document.write('<html>');
document.write('<body>');


I took the OP message to mean: "how can I access the final generated HTML?"

If you're using IE, my thought is you could try copying the innerHTML of the
documentElement to the clipboardData object once the page has loaded. Check
out the following URL for more information on clipboardData, etc:
http://msdn.microsoft.com/library/de...or/dhtml/refer
ence/dhtml_reference_entry.asp


The Document Object Model and ECMAscript are your friends. Edgy stuff
though.

--
Kris
kr*******@xs4all.netherlands (nl)
Jul 20 '05 #6
Stephen Poley wrote:
On Thu, 18 Sep 2003 23:34:49 GMT, Brian
<us*****@mangymutt.com.invalid-remove-this-part> wrote:
<script language="JavaScript">
document.write('<html>');
document.write('<body>');
But is that a good idea?


I did not comment on the wisdom of it. ;-) And the op didn't explain
the context.
It means that someone without Javascript will get a totally blank page.


I have used that idea with a safe fallback on a photography site.
Briefly: thumnail photo is an anchor to the full-sized photo, with an
onclick event that creates a new html document, writes the html,
writes in that document an image tag with the large photo, and returns
false. If js is enabled, visitor gets a framed photo. If not,
visitor gets photo in window, by itself, in upper left corner.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #7
On Fri, 19 Sep 2003 10:59:26 GMT, "Jonathan Snook"
<go***************@snook.ca> wrote:
"Stephen Poley" <sb*****@xs4all.nl> wrote in message
news:m9********************************@4ax.com.. .
><script language="JavaScript">
>document.write('<html>');
>document.write('<body>');


I took the OP message to mean: "how can I access the final generated HTML?"


After re-reading it, I think you're right.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #8

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

Similar topics

9
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
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
1
by: mrbog | last post by:
Using the WebBrowser control, can someone load one of my web pages and see the HTML that has been generated by document.write() javascript? For example, if I have a page that has obfuscated...
6
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...
11
by: Nathan Sokalski | last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls using the Add method of the Attributes collection. However, if the JavaScript code contains certain characters, such as & or...
2
by: pamelafluente | last post by:
Hi dears, I have a plain HTML page. I want to render it a little interactive. I was thinking to add to it 1 script and events to the elements I want to make interactive. Then, I need to...
2
by: ste-m | last post by:
Hi there, I was wanting to calculate how long my web pages take to load, and to insert this time into my HTML source code (not visible from the browser, but only in source view) as a HTML...
2
by: cttseng | last post by:
Dear all, I have a problem that how to get the page's source code which is generated by javascript code? For example: http://grouper.com/video/south%2bpark Although I can see the result page...
5
by: dwmartin18 | last post by:
Hello everyone. I have quite the puzzling problem with a script I have been working on lately. I have created a function that can be called to create a new html element (e.g. input, select, div,...
53
by: brave1979 | last post by:
Please check out my javascript library that allows you to create any layout for your web page, nested as deep as you like, adjusting to width and height of a browser window. You just describe it in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.