473,574 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing from Modal Dialogs

I have an aspx page that has a print button on it. The code for the
clicked event of the print button is:

Dim strScript As String
strScript = "<script language='javas cript'>"
strScript += "window.pri nt;"
strScript += "</script>"
Page.RegisterSt artUpScript("pi rnt", strScript)

The aspx page above is opened using the following code from another
aspx page:

strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth:
center: yes; help: no; resizable: no; status: no;'; "
strScript += "window.showMod alDialog(Page1. aspx, null,
windowOptions); "

Page.RegisterSt artUpScript("Su cessScript", "<script
language='javas cript'>" + strScript + "</script>")

When compiled and ran locally, the print button will envoke the Print
dialog. If I compile the same code and run it from my server the
button does nothing. Anyone know why and what I can do to fix this?

It works in both places when it is not a modal dialog.
Jul 23 '05 #1
2 3826

Lisa wrote:
I have an aspx page that has a print button on it. The code for the
clicked event of the print button is:

Dim strScript As String
strScript = "<script language='javas cript'>"
strScript += "window.pri nt;"

That should be
strScript += "window.print() ;"


Martin Honnen
Jul 23 '05 #2
Martin Honnen wrote:

Lisa wrote:
I have an aspx page that has a print button on it. The code for the
clicked event of the print button is:

Dim strScript As String
strScript = "<script language='javas cript'>"
strScript += "window.pri nt;"

That should be
strScript += "window.print() ;"

It should also be:

strScript = "<script type='text/javascript'>"

Jul 23 '05 #3

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

Similar topics

by: Bjoern Obermeyer | last post by:
Hi, I am writing an application with a JFrame as the main window and several dialogs to gain user input. The problem arises when another window (from a differnent apllication) hides my applications window (while one of the (modal) dialogs is currently showing). When my applications window reappears again the dialog is no longer showing. I...
by: Rod | last post by:
I have an asp.net application where some of the interaction with the user is through modal dialog windows. This works very well except for the annoying fact that the dialog window always returns to its initial position when the user posts back (by clicking a button, etc.) I have all of the fundamentals for asp.net modal dialogs in place,...
by: Andrew Baker | last post by:
OK this has me perplexed, puzzled and bamboozled! I have a remoting service which I displayed a message box in. I then wondered what would happen if a client made a call to the service while the message box was being displayed. Since the call comes in on a different thread the client call was not blocked. This seemed to make sense to me. ...
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also bring up a modal dialog (MessageBox)
by: Ricky K. Rasmussen | last post by:
Hi NG, We have a rather large ASP.NET application that uses popups to display various dialogs to the user. In our work we've come over a rather annoying "bug": If we open a modal dialog using the javascript command window.showModalDialog() we loose the current Session if a new window is opend from within the modal one (using the...
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a preview DIV) 2. when users close the dialog, the application receives the URL to the selected graphic. 3. the modal dialog lets the users upload a new...
by: Lisa | last post by:
I have an aspx page that has a print button on it. The code for the Clicked Event of the Print button is: Dim strScript As String strScript = "<script language='javascript'>" strScript += "window.print();" strScript += "</script>" Page.RegisterStartupScript("print", strScript)
by: wendy | last post by:
I have got a problem while using the modal dialogs. In my code I need to open a modal dialog from the parent page and I need to enter some values in the dialog and save it. It takes the values properly and also does the validation of the values but it doesn't hit the event handler of the button where it is supposed to save those values and...
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the dialog. To be more specific I want to have a confirmation dialog that is shown when a user clicks on a Delete button (which deletes some values from...
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form modally. I also have a separate thread running that monitors a card reader. If the user removes the card then the thread calls back the main form to tell...
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...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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...
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...
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...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
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...

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.