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)
The aspx page above is opened using the following code from another
aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth:
600px;
center: yes; help: no; resizable: no; status: no;'; "
strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) +
"&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" +
CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null,
windowOptions);"
Page.RegisterStartupScript("SuccessScript", "<script
language='javascript'>" + 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? 6 1747
There can not be postback directly in modal dialogs.
You can for example put your aspx page into iframe in htmlpage or BETTER
replece your server button with something like this :
<button onclick='window.print()'>Print</button>
"Lisa" <li**********@gnb.ca> wrote in message
news:fd*************************@posting.google.co m... 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)
The aspx page above is opened using the following code from another aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth: 600px; center: yes; help: no; resizable: no; status: no;'; " strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) + "&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" + CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null, windowOptions);"
Page.RegisterStartupScript("SuccessScript", "<script language='javascript'>" + 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?
Perhaps it is your IE security settings. This is all clientside code though,
and not really server so you may want to ask in a javascript group.
--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Lisa" <li**********@gnb.ca> wrote in message
news:fd*************************@posting.google.co m... 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)
The aspx page above is opened using the following code from another aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth: 600px; center: yes; help: no; resizable: no; status: no;'; " strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) + "&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" + CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null, windowOptions);"
Page.RegisterStartupScript("SuccessScript", "<script language='javascript'>" + 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?
Hello Lisa,
Try putting <base target="_self"/> in the .aspx for your dialog.
--
Matt Berther http://www.mattberther.com 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) The aspx page above is opened using the following code from another aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth: 600px; center: yes; help: no; resizable: no; status: no;'; " strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) + "&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" + CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null, windowOptions);"
Page.RegisterStartupScript("SuccessScript", "<script language='javascript'>" + 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?
try this..
<script language="javascript">
window.name = "Popup"
</script>
<form id="Form1" method="post" target="Popup" runat="server">
"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='javascript'>" strScript += "window.print();" strScript += "</script>" Page.RegisterStartupScript("print", strScript)
The aspx page above is opened using the following code from another aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth: 600px; center: yes; help: no; resizable: no; status: no;'; " strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) + "&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" + CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null, windowOptions);"
Page.RegisterStartupScript("SuccessScript", "<script language='javascript'>" + 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?
Hello vinay,
This is the same idea as doing
<base target="_self"/>
albeit, much less convoluted...
--
Matt Berther http://www.mattberther.com try this..
<script language="javascript"> window.name = "Popup" </script> <form id="Form1" method="post" target="Popup" runat="server">
"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='javascript'>" strScript += "window.print();" strScript += "</script>" Page.RegisterStartupScript("print", strScript) The aspx page above is opened using the following code from another aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth: 600px; center: yes; help: no; resizable: no; status: no;'; " strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) + "&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" + CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null, windowOptions);" Page.RegisterStartupScript("SuccessScript", "<script language='javascript'>" + 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?
U are right :)
"Matt Berther" wrote: Hello vinay,
This is the same idea as doing
<base target="_self"/>
albeit, much less convoluted...
-- Matt Berther http://www.mattberther.com
try this..
<script language="javascript"> window.name = "Popup" </script> <form id="Form1" method="post" target="Popup" runat="server">
"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='javascript'>" strScript += "window.print();" strScript += "</script>" Page.RegisterStartupScript("print", strScript) The aspx page above is opened using the following code from another aspx page:
strScript = "var windowOptions = 'dialogHeight: 400px; dialogWidth: 600px; center: yes; help: no; resizable: no; status: no;'; " strScript += "window.showModalDialog(page.aspx?v1=" + CStr(intVar1) + "&occ=" + CStr(intVar2) + "&loc=" + CStr(intVar3) + "&total=" + CStr(intNumBooks) + "&totald=" + CStr(intNumDiagBooks) + "', null, windowOptions);" Page.RegisterStartupScript("SuccessScript", "<script language='javascript'>" + 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? 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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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
|
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...
|
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...
|
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,...
|
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,...
|
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...
|
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...
|
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,...
|
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...
| |