Forum Moderators: open
5 months later, and having brushed this aside as "just one of those things," a solution hit me: window.parent.open(). Apparently, the embedded object (scriptlet) itself is in and of its own session. Interestingly, however, this session can "talk to" other sessions via window.parent and such, as necessary.
Just thought I'd throw that out there for you gluttons for IE javascript and IIS woes.
I am in a similar situation. Currently, I am sending key values for database queries in a new window through a hidden field. Keeping this in the same session would be much better. (so you couldn't do a view source and view the hidden field)
When you say 'parent', is that where I put the document name?
Here's how I currently have this set up. How should this be changed?
<script language="JavaScript">
<!--
function myOpenWindow()
{
myWindowHandle = window.open('about:blank','Print Comments','width=800,height=600');
}
//-->
</script>
.
.
.
<form action="print_comments.asp" target="_blank" method="post" name="hidden_print" onSubmit="myOpenWindow()">
<input type="hidden" value=<%= Session("keyed_ssn") %> name="keyed_ssn_h">
<input type="hidden" value=<%= Session("rev_id") %> name="rev_id_h">
<input type="submit" value="Print Comments" name="enter" >
</form>
Thanks!
Lisa
ex. In an iframe (or scriplet as with my issue), window and window.self is the iframe, and window.parent is the window containing the iframe.
Is your document within an iframe?
ex:
<form action="printdoc.asp" target="winDocPrint">
...
</form>
<script>
function openwin() {
window.open("about:blank", "winDocPrint", "..size,etc");
}
</script><form action="printdoc.asp" target="winDocPrint" onsubmit="openwin">
...
</form>
Notice that winDocPrint refers to and corresponds with the name of the window you've opened on submit.
That should do something like what you want: open a new window to a certain size and submit a form to it.