473,406 Members | 2,705 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,406 software developers and data experts.

Open multiple browser windows


I am working on some web based custom reports and i want to open multiple
browser at the click of a button. So for example if i have 2 guids in my
arraylist, i want to open 2 windows.

protected void viewReport2_Click(object sender, System.EventArgs e) {

ArrayList lstReports = new ArrayList();
lstReports.Add("A1CBA123-2881-4654-86B9-6F35BCE23604");
lstReports.Add("A16C569A-6FE4-4FE1-B401-9FA9750C689F");

foreach (string str in lstReports) {
previewReport(str);
}
}

private void previewReport (string reportGuid) {
string url;
url = "Report.aspx?" + "reportuid=" + reportGuid.ToUpper() +
"&__format=XML&account=gstt";
Response.Redirect(url, false);
}

(Note: Report.aspx will take the parameters supplied and generate reports).

In my client side i have the following _javascript.
function viewReport2(){
var form = document.getElementById("clientreports");
form.target = document.getElementById("__newWindow").checked == true ?
"_blank" : "_self";
}
which i call from the eventhandler of the button
_btnViewReport2.Click += new System.EventHandler(this.viewReport2_Click);
_btnViewReport2.Attributes.Add("onclick", "return viewReport2()");
When i run the report, only 1 new window opens. Which is understandable. how
can i modify the code to get it to open multiple windows. The button ca only
be clicked once.

Thanks
Nov 19 '05 #1
2 2628
are you specifying different targets for each window... couldnt tell
initially from your code.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Ayoa" wrote:

I am working on some web based custom reports and i want to open multiple
browser at the click of a button. So for example if i have 2 guids in my
arraylist, i want to open 2 windows.

protected void viewReport2_Click(object sender, System.EventArgs e) {

ArrayList lstReports = new ArrayList();
lstReports.Add("A1CBA123-2881-4654-86B9-6F35BCE23604");
lstReports.Add("A16C569A-6FE4-4FE1-B401-9FA9750C689F");

foreach (string str in lstReports) {
previewReport(str);
}
}

private void previewReport (string reportGuid) {
string url;
url = "Report.aspx?" + "reportuid=" + reportGuid.ToUpper() +
"&__format=XML&account=gstt";
Response.Redirect(url, false);
}

(Note: Report.aspx will take the parameters supplied and generate reports).

In my client side i have the following _javascript.
function viewReport2(){
var form = document.getElementById("clientreports");
form.target = document.getElementById("__newWindow").checked == true ?
"_blank" : "_self";
}
which i call from the eventhandler of the button
_btnViewReport2.Click += new System.EventHandler(this.viewReport2_Click);
_btnViewReport2.Attributes.Add("onclick", "return viewReport2()");
When i run the report, only 1 new window opens. Which is understandable. how
can i modify the code to get it to open multiple windows. The button ca only
be clicked once.

Thanks

Nov 19 '05 #2
Thanks for your reply. I am specifying the target window as "_blank"
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
10
by: David McCulloch | last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it. Why not? (Don't ask why I simply did not open the window with the new size....my original problem was how to open a...
4
by: Ian Sedwell | last post by:
Hi guys The following code works just fine in Netscape on MacOS and Windows. But in Explorer on MacOS and Windows it throws a type mismatch error at the point marked with the comment ³// bug out...
2
by: nntp | last post by:
Are there other ways to open multile windows at once? <SCRIPT language="JavaScript"> function open1() { var open1 = window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600...
4
by: google | last post by:
Hi there, I've searched high and low for this, but it seems most people are looking to establish (and control) the relationship between a parent browser window and it's associated child window...
17
by: DaveC | last post by:
Hi, If I set up a link to take my viewers away from my site, how can I force their browser to open a second copy? Idea, of course, is to bring viewers back into my site when they close the 2nd...
13
by: Geoff Fox | last post by:
I am in the final moments of designing a new website. One of the pages (http://www.auditionfactory.com/samples.php) has four links to show sample work. I would like these links to open new...
1
by: dnes | last post by:
Open Multiple New Browser Windows from ASP.NET I'm having trouble figuring out how to open multiple new browser windows (each one displaying something different). As you can see from the code...
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am thinking about doing this since I got several cases that some of our internal users open more than one browser at the same time from our server. When one of the transactions was not...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.