This works, the javascript works, but it does not show up in the
source.
If you save the page, the javascript is not there. Only the HTML is
visible.
This is in NS4.04. I haven't tried IE (IE browser is down, Net slow to
download new) Is this normal, is there a way around this, or is there a
browser that will show this?
Sample code below...
Jeff
/*
<html>
<head>
<script language="javascript">
function openWriter(){
var t="t"
var form_writer = window.open("","","menubar")
form_writer.document.open()
form_writer.document.writeln('<html><head>')
form_writer.document.writeln('<scrip'+t+' language="javascript">');
form_writer.document.writeln('function a(){alert("open sesame")}')
form_writer.document.writeln('</scrip'+t+'></head>');
form_writer.document.writeln('<body>')
form_writer.document.writeln('<a href="javascript:a()">alert</a>')
form_writer.document.writeln('</body></html>')
form_writer.document.close()
}
</script>
</head>
<body>
<a href="javascript:openWriter()">write window</a>
</body>
</html>
*/
===============================
"Skaman" Sam (sykic...@aol.com)
President / Webmaster
Fightin' Irish Inc.
The Hell Factory -- http://members.aol.com/skamansam
Tate Street Online -- http://members.aol.com/tatestreet
===============================
Actually, what I'm doing is generating web pages with embedded javascript arrays. The
end object is to save the created webpage. If I save the page, there is no javascript,
even though the javascript in the page functions. Sorry to mislead you about viewing
source, the object is to save the code.
Jeff
> I'm document.writing javascript functions (I'm writing the whole
>page) to a child window.
>
> This works, the javascript works, but it does not show up in the
>source.
>If you save the page, the javascript is not there. Only the HTML is
>visible.
>
> This is in NS4.04. I haven't tried IE (IE browser is down, Net slow to
>download new) Is this normal, is there a way around this, or is there a
>browser that will show this?
In 4.5 (full version) the same thing happens, when you click on save
file on a generated page for some reason it attempts to save the
wysiwyg: version,
(in response to the othe guys post view-source of such a page gives
the source of the parent page.)
Under my version of IE4 (4.71.1712.6) I get compete garbage under the
save as... however view source works correctly (using notepad as
external viewer), IE4 also puts the files in your temp direcrory... so
it's very stupid that save as doesn't work....
Is it really a problem though? or do you want to use a webpage to
write another, in which case instead of writing it to a new page,
write it to a textarea and then cut and paste it out to a file, or use
Ie4 and view source and then save..
>
>Sample code below...
Jim.
Thanks, I had wanted to automate the process and thought it was worth a shot.
I had thought of the text area and then got inspired. I think I've figured a
work around using document.referrer to write a bad script tag.
Jeff
>
>
> >
> >Sample code below...
>
> Jim.