Hello,
I'm getting hard time solving a problem.
I have a datagrid with checkboxes. Based on the rows checked, when the
user click on link (named export) i want to open a window and export
the data in Word, Excel, etc.
So I need to post back to server, check the rows checked, form the url
with the appropriate querystring (with IDs of each checked rows) and
then open window with that URL.
I've tried several ways with no luck. LinkButton with attributes
"onclick" but it will work then next time you press the link, an
anchor with onserverclick and onclick: onserverclick saves the IDs in
a session var, and onclick opens a window with the "nude" link
(problem is onclick is called *before* onserverclick), etc.
The only viable way is to add a javascript code in the page that open
the window, but it's completely stupid since if the user goes back, a
window will open again, export and open Excel...
I'm really stuck, I'm about to forget the "new window" concept...
except if someone has a suggestion :)
Thanks!
lamazzi 1 1559
Hi
You can very well use javascript ,when the user checked some rows get the rows id and form a querystring in javascript and open a window withthese parameters as query string and if user click again export link you can restrict user to open single window or display message saying "already window open...."
"oleole" wrote: Hello,
I'm getting hard time solving a problem.
I have a datagrid with checkboxes. Based on the rows checked, when the user click on link (named export) i want to open a window and export the data in Word, Excel, etc.
So I need to post back to server, check the rows checked, form the url with the appropriate querystring (with IDs of each checked rows) and then open window with that URL.
I've tried several ways with no luck. LinkButton with attributes "onclick" but it will work then next time you press the link, an anchor with onserverclick and onclick: onserverclick saves the IDs in a session var, and onclick opens a window with the "nude" link (problem is onclick is called *before* onserverclick), etc.
The only viable way is to add a javascript code in the page that open the window, but it's completely stupid since if the user goes back, a window will open again, export and open Excel...
I'm really stuck, I'm about to forget the "new window" concept... except if someone has a suggestion :)
Thanks!
lamazzi This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RobG |
last post by:
I am trying to dynamically add an onclick to an element,
however I just can't get the syntax right. consider the
following function:
function doClick (evt,x) {
// do things with evt and x
}
Which is called statically by:
<button onclick="doClick(event,this);">Click me</button>
|
by: David |
last post by:
I have a one-line script to add an onunload event handler to the body of the
document. The script is as follows:
document.getElementsByTagName("BODY").onunload=function s() {alert("s")}
Now obviously, I put the alert("s") part in for debugging purposes, just to
make sure the error wasn't in any code I was going to be running. This line
works just fine in IE6 but in Firefox it doesn't. However, if I replace
that line with the...
|
by: simon |
last post by:
On code behind file:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim ctrl As New LinkButton
ctrl.ID = "link1"
ctrl.Text = "link create"
ctrl.CommandArgument = "myargument"
|
by: oleole |
last post by:
Hello,
I'm getting hard time solving a problem.
I have a datagrid with checkboxes. Based on the rows checked, when the
user click on link (named export) i want to open a window and export
the data in Word, Excel, etc.
So I need to post back to server, check the rows checked, form the url
with the appropriate querystring (with IDs of each checked rows) and
|
by: adamredwards |
last post by:
I have a page with some form elements that are dynamically generated.
They are inserted into the dom by first cloning a node, changing the
values like name, and then inserted with insertBefore().
When a field gets added, a link that opens a popup window is next to
it. The popup is opened and has the name of the parent element it
should change in it. The user can use the popup to get a list of
results. In the results I would like them...
| |
by: GaryB |
last post by:
Hi Guys,
I've been battling with this one for hours - I hope that you can help
me!
My code modifies the <aon a page, from a standard document link into
a link with a tailored onclick event.
It works perfectly (assigning the correct images and the correct
onclick events to the correct <atags):
|
by: vj |
last post by:
How i can populate all fileds dynamically in jsp page based on contents
found in xml file?
I have written jsp servlets and java class file.
i transferred automatic data from jsp to servlet then to java class
which creates a xml file based on values entered in dynamic jsp page.
Now i want to read all those values entered to xml in my other jsp
page.
I am able to call values from file in my jsp page.
But as dynamic values can be any in no...
|
by: sandeepdesai |
last post by:
Hi.. i am new to javascripts,
i am using a addRow scipt to add rows to a table dynamically.
one of the cells(say cell2) in a Nth row needs to be hyperlinked to another script.
for example:
function addRow() // the add row script
{
|
by: TurboRogue |
last post by:
So here's the basic premise:
I have an html page with a bunch of pictures (pic.html). All of the images are thumbnails of larger photos. I also have another html page which is a pop-up window essentially (popup.html) (it's a standard html page that I've set to a smaller width/height by using javascript). The popup.html page has 2 divs in it, one with the area that I'm trying to populate dynamically with the full size image of the link that...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |