Closed Thread Icon

Preserved Topic: Saving dynamic page? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18074" title="Pages that link to Preserved Topic: Saving dynamic page?" rel="nofollow" >Preserved Topic: Saving dynamic page?\

 
Author Thread
lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 07-17-2001 12:50

Hi!

I wonder if I can save a page that have been changed w/ runtime and w/ user interaction?!
like for example:

code:
for (i=0;i<10;i++)
document.write(i);


is it possible somehow to save that page with the content that was generated by this last loop?


Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-17-2001 14:25

Two things you may want to look into, but I'm not going to tell you the details at the moment, since they're both complicated: CGI and cookies. CGI can let you save a file on the server, and you can use that to save data. Cookies let you save small amounts of data on the client's machine, provided they allow you to. Cookies are probably your best option here - but don't expect to save long text files.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 07-17-2001 18:56

You can use JS to completely create a form or change a form value which can then be submitted to a form which saves the value.

If you let us know what you are trying to accomplish we can be more specific.



Walking the Earth like Kane

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 07-18-2001 10:05

Guys you totally misunderstood me!

The code i showed above was only to say that the "View Source" of the page is what i wrote, but the current displayed page is something else!
I want to save the Page as it appears and not as it is written!
I also mean that all what have been dynamically changed must be read from memory by the Browser and Reconstructed and written as HTML document.

Hope you got me this time.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-18-2001 17:31

That's not possible.

BTW That's why JavaScript is called Client-Side language, so you'll have to use some Server-Side language if you want to do that.



[This message has been edited by mr.maX (edited 07-18-2001).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-18-2001 18:26

It's not possible, no. But tell us why you want to do this, because we may be able to point you to some other ways to do what you want to do, ultimately. Are you trying to hide some of the JavaScript from viewers? Are you trying to debug your page? Do you want to see what is output by the JS? You may be able to do some of these things in *other* ways.

So... tell us what you're trying to accomplish. =)

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 07-20-2001 10:00

One more simpler example:

code:
<html>
<head><title> New Document </title></head>
<script language="JavaScript">
<!--
function resetdoc()
{
document.open();
document.write('What\'s up doc?');
document.close();
}
//-->
</script>
<body onload="resetdoc()">
<h1>Hello world</h1>
</body>
</html>



If i save this HTML page the source must contain all the objects that are currently in the browser, which are:
the "Body" tag and it's childs and the "script" object.

That's what i want.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 07-20-2001 12:57

As said above, that's not possible.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 07-20-2001 18:56

Yup

What he said.. You are going to need some sort of combo of a server side language and a form submission to do this.


Walking the Earth like Kane

« BackwardsOnwards »

Show Forum Drop Down Menu