469,949 Members | 2,203 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

windwo.open querystring parameters

I have asp1 that posts to asp2 which uses request.form to get info
from asp1. How can I get the window.open function to process form
asp1's posted inputs? What I am trying to do is allow the user the
choice of viewing an asp in a frame, or in a full window. Either way,
I want it to open asp2 and have the request.form get the info. This
doesn't work for me using window.open, I assume, because form asp1
isn't being submitted, and it's action (which is the URL of asp2)
isn't used.

Any help is appreciated.
Jul 19 '05 #1
3 6196
Stephen Witter wrote:
I have asp1 that posts to asp2 which uses request.form to get info
from asp1. How can I get the window.open function to process form
asp1's posted inputs? What I am trying to do is allow the user the
choice of viewing an asp in a frame, or in a full window. Either way,
I want it to open asp2 and have the request.form get the info. This
doesn't work for me using window.open, I assume, because form asp1
isn't being submitted, and it's action (which is the URL of asp2)
isn't used.

Any help is appreciated.


You can response.write information from server-side code into client-side
code. like this:
sub window_open
dim str
str="<%=request.form("somevariable")%>

Now the client-side code can do whatever it wants with the value contained
in the str variable.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
hi,
you can use too in the onunload event of opened window(javascript):
window.opener.frmX.txtX.value = VarX;

bye
vilmar

"Bob Barrows" <re******@NOyahoo.SPAMcom> escreveu na mensagem
news:ea**************@TK2MSFTNGP12.phx.gbl...
Stephen Witter wrote:
I have asp1 that posts to asp2 which uses request.form to get info
from asp1. How can I get the window.open function to process form
asp1's posted inputs? What I am trying to do is allow the user the
choice of viewing an asp in a frame, or in a full window. Either way,
I want it to open asp2 and have the request.form get the info. This
doesn't work for me using window.open, I assume, because form asp1
isn't being submitted, and it's action (which is the URL of asp2)
isn't used.

Any help is appreciated.


You can response.write information from server-side code into client-side
code. like this:
sub window_open
dim str
str="<%=request.form("somevariable")%>

Now the client-side code can do whatever it wants with the value contained
in the str variable.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jul 19 '05 #3
In case anyone is interested, here is how I did it:

In the asp2 page I put the following:
<%
'in the event a user has selected a full view
'get the posted values
for each item in request.form
response.write("<input type=hidden name=""" & item & """ value="""
& request.form(item) & """>" & vbcrlf)
next
%>

This dynamically adds the input items (hidden) to the newly opened
window

in asp1 I used:

<script LANGUAGE="JavaScript">
function clickGo() {
document.frmParam.action = "<%=Reportpath%>";
WinWidth=screen.width-10
WinHeight=screen.height-90
winOpts="toolbars=no,status=yes,width=" + WinWidth + ",height=" +
WinHeight + ",top=0,left=0,maximize=yes,location=no,directorie s=no,scrollbars=yes";
window.open('','FullView',winOpts);
document.frmParam.target = 'FullView';
document.frmParam.submit();
}
</script>

I have a submit button that calls the clickGo function

my form tag:

<form name="frmParam" method="POST" action="<%=Reportpath%>">

the <%=Reportpath%> is a vbscript variable that gets the report path
from a database

sw*****@medamicus.com (Stephen Witter) wrote in message news:<18**************************@posting.google. com>...
I have asp1 that posts to asp2 which uses request.form to get info
from asp1. How can I get the window.open function to process form
asp1's posted inputs? What I am trying to do is allow the user the
choice of viewing an asp in a frame, or in a full window. Either way,
I want it to open asp2 and have the request.form get the info. This
doesn't work for me using window.open, I assume, because form asp1
isn't being submitted, and it's action (which is the URL of asp2)
isn't used.

Any help is appreciated.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Eric van der Niet | last post: by
2 posts views Thread by Alessandro Rossi | last post: by
3 posts views Thread by Nobody | last post: by
5 posts views Thread by Vishwanathan Raman | last post: by
5 posts views Thread by Nirmal Singh | last post: by
4 posts views Thread by | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.