473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 6283
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Krechting | last post by:
Hi All, I need a button on my form that opens a new window. I put in a submit button but it always returns to my first page. And then my first page is empty. What button do I need to go to...
5
by: Mike | last post by:
Is it possible to loop round all querystring parameters in a web page (i.e. access them without hardcoding them)? I want to do this because I have a page that has different querystring variables...
3
by: Eric van der Niet | last post by:
Hello all, What i want to do is the following. I want to call a c#.net file from an html page. this htm send some parameters to the C# (asp) file. In Vstudio2003 what kind of file should this...
2
by: Alessandro Rossi | last post by:
Hi, I have a usercontrol with a button. In the button's click event I have to open an instance of an aspx page, passing some values to some public variables of the page. How can I call the instance...
3
by: Nobody | last post by:
Hi -- I'm developing an ASP.NET application in VS.NET and I want the startup page to read in some parameters from a querystring. But I can't figure out where to set the querystring. I thought it...
5
by: Vishwanathan Raman | last post by:
I have only one page.Its a search results page.Depending on the component selected in the results page the search is initiated. I am using QueryString to send me details pertinent to search.But I...
5
by: Nirmal Singh | last post by:
I am a newbie trying to learn ASP.net 2.0. I want to retrieve the QueryString and process it to produce some parameters. I then want to redirect the user to another page, passing these...
0
by: mohaaron | last post by:
Hello all, I'm having a problem using the ReturnUrl parameter while using FormsAuthentication. If I already have some querystring parameters in the url like this. ...
4
by: | last post by:
Hi all, If I am reading this right, then the querystring parameters must be "&amp;" and not "&". However, IIS 6.0 and asp.net request.querystring fails to capture the values if "&amp;" is specified....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.