Discussion Locked

javascript writing javascript

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a page that I'm using javascript on heavily. when the user clicks a button, i want it to write a new document based on the information the user's selected on the first page. The catch is this: on this new document I also want some javascript that the user can use to further manipulate the information they've selected. so far, when telling the javascript on page 1 to write javascript for page 2, it doesn't put anything in the file. is there any way around this?

thanks

7 replies

by hclarius

I assume you have the proper permissions on the web server and you are not trying to do this on a "personal" web page. If you are trying to do "web hosting" on the cheap (without the proper access to your web server, you will not be able to pass info from one page to the next).
Use an HTML form with whatever data you capture from the user through checkboxes, lists, text boxes etc.. You can develop info and store additional data in HIDDEN INPUTS.

by bc3 technologies

the problem or glitch is with javascripts document.write() property... it will not write anything that contains javascript, ie: document.write("function hi() {"); it refuses to do that along w/ even putting in a

by vcsekhar007

Do this way:

Embed the following script in Page1.html and run page1.html:

Let me know your feedback on the above result.

by bc3 technologies

Thank you! i was unaware you were required to make a window variable in order to write javascript to it. thanks again!

This discussion is closed to new replies.