Close The Popup After Update?

Feb 22, 2012

I am Opening a Page as a Popup i am using Telerik WIndow which has similar functionality when opening a Popup like this

Code:

function OpenPopUp(val_real, vis) {
var myWidth = 0, myHeight = 0;
if (typeof (window.innerWidth) == 'number') {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;

[code].....

this "myPage.aspx" page has a button that person some updates to the Database on the server side. This is opened as a popup and there is a grid below , so what i want to do after the Update to the Database has happened , i want to refresh the Grid, i have this code

Code:
//This code is used to provide a reference to the radwindow "wrapper"
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)
return oWindow;

[code]....

and on the server side i have this

Code:

Response.Write("<Script>return RefreshParentPageWithoutWarning();</script>")

or

Code:

SavetoDB(Values)

ScriptManager.RegisterStartupScript(Page, Me.GetType(), "", "RefreshParentPageWithoutWarning()", True)

My problem here is that it Refresh the page before it does a Database Update, and if it refreshes the page , the Database update ends up not being done.

View 2 Replies


Similar Messages:

AJAX :: Can Close A Modal Popup Through VB.net

Feb 1, 2011

How can I close a Ajax Modal Pop-up through VB.net? All i want to do is just click the cancel button in the code behind, or if you can think of something better?

View 3 Replies

AJAX :: Modalpopup As Usercontrol - Cannot Close Popup

Dec 9, 2010

My popup is a usercontrol, which as datagrid , OK button and Cancel button. My ModalPopup Extender is in page(Page1.aspx)How do i close the popup without posting back. I cannot use CancelControlID because mymodalpopup extender is in page1.aspx and my Cancel button is in Usercontrol.

View 4 Replies

Web Forms :: Refresh And Close Popup Window?

Mar 5, 2010

I have all of my code into one ASPX file. Called Scheduler.aspx. I am using the DayPilot scheduler and the Obout Flyout. But i moved it all to one page to make it simpler. But one thing I am having probelms with is; when I save my popup it should close and refresh the page. And when I hit the close link it should close (which it does) and then refresh the popup when I click on it to open again (which it doesnt). Since I have this all on one form and I am calling the popup using the flyout I can't figure out how to do these.

My page is called: Scheduler.aspx

My Scheduler is called: dps

My flyout is called: EventFlyout

Right now I have the flyout opening from a label. So when I click on the label my flyout opens, I insert data and it saves to the database. But i have to close my browser and open another to get the data I just imputed to show.

View 9 Replies

Include Close Option In Popup Window?

Jan 10, 2011

< asp:ModalPopupExtender
ID="popupctrl"
runat="server"
TargetControlID="popup2"
PopupControlID="popupcontent" >
</asp:ModalPopupExtender>

this is my popup window code.. how can i include close(*) icon and make it work??

View 3 Replies

AJAX :: PostBack Causes Modal Popup To Close

Jun 1, 2013

I am using model popup to allow user to input there information . In this model popup . I am having two option  Like OPtion-1 and Option-2 . When User will select Option-1 a panel should open on modelpop up to take Option-1 Detail .Simillarly When Option-2 is pressed another panel should open where User Can fill data. User Ca Fill only single option either OPtion-1 or 2 . 

How I can do this without postback and without model disappear. I don't want to use radio or checkbox button  .I want something good looking and with working function.

View 1 Replies

Web Forms :: How To Close Popup Window Without Alert Box Message

Feb 8, 2010

I produce a popup window by adding a hyperlink to a table cell dynamically in my vb.net code behind. Here is the code:

Dim sHyperlink As
String =
"<a href=""LabPopup.aspx?RefNo=" & iLabRefNo &
""" target=""_blank"">" & strValue &
"</a>" objCellValue.Controls.Add(New LiteralControl(sHyperlink))

So on my web page, I will have a list of these hyperlinks and each have a different iLabRefNo. When I click on one of these links, the popup window does appear correctly.

I have a button on the popup window that closes the popup. But I get this message in an alert box when click on my button:

The webpage you are viewing is trying to close the window. Do you want to close the window?

If I click OK then the window close. But I just want to close the popup wondow without this message. What do I need to do?

Here is my code for the button to close the popup:

<asp:Button
ID="cmdLabPopupClose"
runat="server"
Text="Close"
OnClientClick="CloseWindow()"
/>
<script type="text/javascript">
function CloseWindow() {
window.close();
}
</script>

View 11 Replies

Web Forms ::close Window Itself When Popup Button Clicked

Aug 15, 2010

On successfull update a popup is appearing that "Data updated Successfully." with the Ok button. I used following piece of code:

Page.ClientScript.RegisterStartupScript(Me.GetType(),
"MyScript",
"alert('Record Updated successfully.!');",
True)
REQUIRED:

I want if user click OK button then window should also close.

View 10 Replies

AJAX :: How To Close Calendarextender Updatepanel While Javascript Popup

Nov 12, 2010

in my aspx page,

1. am using calendarextender bind with text box

2. button click event call th SQL stored procedure to save the form values

3. after save and get the output value from the SQL SP ( its boolean value)

4. if true i have to show the javascript alert or else nothing have to alert, so this is the code

if (CheckandBooked())
{
ScriptManager.RegisterClientScriptBlock(btnBook, typeof(string), "alertscript", "alert('Selected time period clashes with existing booking');", true);
}
bug: this is working good but while showing the alert time i can see the calender( it look like design view) the design is adjusted how to avoid this

View 13 Replies

Web Forms :: User Controls And Close The Popup Window

Mar 15, 2010

I inherited a poorly designed ASP.Net web site. Here are some of the main parts;

1. Default.aspx. This web page conatins several user controls that do the bulk of the work.
2. Alerts.ascx. Used by Default.aspx
3. Dashboard.ascx. Used by Default.aspx.
4. LabResults.aspx. Popup window called from Alerts.ascx

bear with me while I describe the scenario:

1. The user clicks a button on default.aspx and a page in Alerts.ascx is displayed. This works fine.

2. The user then clicks a hyperlink control on Alerts.ascx and the popup window LabResults.aspx displays. This also works fine.

3. The user clicks a button on the popup window. Here is where I am having problems. I want to close the popup window and do a post back but not to Alerts.ascx. i want to instead call dashboard.ascx and run a particular event which displays some patient info. I do not know how to pass control to the dashboard.ascx user control at his point. Presently, my popup window closes which is good but the Alerts.ascx page is still displayed. I want to close this page and open the dashboard.ascx instead.

View 12 Replies

C# - Kill Session On Popup Close Until The Closing Of Browser?

Nov 4, 2010

I want to show a popup about browser compatibility to the users visiting my website. I have used the popup in about 5 pages and it would be annoying for the users to see the same popup for more than once when they visit my website. So I am thinking to use a session and kill it when the user closes the poup. IT should not be shown until the browser is restarted.

View 4 Replies

Popup Window From Javascript And Disable Its Close Button?

Jun 19, 2010

I have opened a pop up window from javascript.I want to do some work with this window

1- want to disable its close button

2- want to show this window always on top

3- want to change toolbar color.

View 6 Replies

Web Forms :: Close Popup Window By Server Side Code?

Jan 5, 2011

I open a popup window by client code. Now I want to do some calculation on this popup window & if it success then I want to save the calculation result in a session variable and close the window. I mean I want to click a button on popup window, it will do some calculation on server side and if it success the it will store the calculation result in a session variable and close the popup window.

View 6 Replies

Modal Popup Extender Close ICON Or Cross In Top Right Corner?

Oct 4, 2010

I am using a modal extender pop up with dimensions 400px by 400px and in the top right corner I want to put a image cross that when clicked will shut the modal pop up.

I know to make the cancel control to the buttom image but I have seen on some sites the image that seems to sit half in and half out the modal pop up extender DIV box which the effect I like more than an image internal to the DIV of the modal popup floated right corner.

View 1 Replies

AJAX :: Close A Popup Window Which Contains An UpdatePanel Using Javascript In Code Behind

Mar 22, 2011

I have a popup window (aspx page) which is used to save log messages to the DB. I want to close this popup as soon as the user clicks the save button and the message has been saved into the database. My issue is the popup does not close when I use an UpdatePanel in conjunction with an UpdateProgress control.

Pages and Controls: ImplantQuoteInfo.aspx, ImplantQuoteRevisionLogMessageAdd.aspx, ImplantQuoteRevisionLogMessageAdd.ascx

ImplantQuoteInfo.aspx: This page creates the popup windows using RegisterStartupScript

[Code]....

ImplantQuoteRevisionLogMessageAdd.aspx: This page holds the user control with the funcitonality

ImplantQuoteRevisionLogMessageAdd.ascx: This user control takes a message text and saves it into the database. The control uses an HtmlEditor inside an UpdatePanel and an UpdateProgress control.

Markup:

[Code]....

C# code behind:

[Code]....

PS: I am using .NET framework 4.0, Windows 7, SQL 2008 R2.

View 2 Replies

Iframe / Showing The Report As A Popup - User To Be Able T Close Window?

Sep 11, 2010

I have been reading up on a few atricles, and am now vey confused on which is the best option and how to go about it.

I have an aspx page that has a gridview with x amount of records. Each record has a checkbox to selet that record for processing. When a user clicks a button it runs some vb.code behind which generates a file for all the records selected in the gridview. This works fine, however, I also want to display a report at the end.I created a rdlc report ("ItemListing") which I can display in a reportviewer. What I want to do is show this report as a popup / new window infront of he current aspx page , to allow the user to print or save . I also want the user to be able t close this window.

View 10 Replies

AJAX :: Server.HTMLDecode Works But Modal Popup Doesn't Close

Oct 19, 2010

As the title of this post already mentioned, I'm using a modal popup window to edit rows in the gridview. One column in the gridview contains an URL code. When I fire the edit button a popup opens and show the URL in a textbox in this format: [URL]

When I am using the Server.HTMLDecode function, the modal popup doesn't close anymore.

I am using the following code:

[Code]....

The funny thing is, when I change it to: txtURL.Text = row.Cells[3].Text; then I can close the modal popup, but unfortunately it is not decoded.

View 3 Replies

AJAX :: Modal Popup Close In Server Or Client Side By Certain Time Period

Jul 13, 2013

How to Model Pop Up Extender control invisible by certain time period.

View 1 Replies

AJAX :: Modal Popup Close After Postback Event In An Ascx File (user Control)?

Feb 15, 2011

I have an aspx page with multiple modal popups. These modal popups are trigger in the page behind code using .Show() and .Hide().

This is what I have in the .aspx page for the particular modal popup under discussion:

[Code]....

The example below demonstrates the type of calls I am making to the modal popup extenders. Basically using the Datalist item command, the datalist commands are responsible for triggering my modal popups.

[Code]....

They all work fine after postbacks except the "activityReport" case (the last one). The only difference with this modal popup is that it contains a user control and all the postbacks are happening in the user control. So the problem is that in the last case whenever a postback happens in the user control then the modal popup is close.

1. If I separate the modal popup and place it in a page all by itself and trigger it to .Show() through a button click in the page behind code then the modal popup doesn't close. See below example.

[Code]....

2. The button click event in the test page looks as follow:

[Code]....

View 2 Replies

How To Update SQL DB Table On Browser Close In VB.NET

Jun 1, 2010

How would I update a table in a SQL database if/when someone closes their browser after visiting a webpage?I'm manually set-up a table which will be updated when the person logs in; their login time. I have it configured so that if they click on logout, it'll update their log-off time. The issue is that if they just close their browser, I need it to update the table with this time

View 1 Replies

AJAX :: Close A Flyout In Update Panel?

Sep 11, 2010

I am using a flyout to show info, it opens with a javascript function, I put the whole content of flyout in updatepanle so that some elements can be updated without whole page reload, on close buttons both asp:button and ordinary html button are not functioningIf I remove update panel whenever I click close buttons ( both asp or html button ) the page gets refreshed.

[Code]....

How can I close my flyout simply in the way that it opens by javascript and not with postback?

View 4 Replies

Forms Data Controls :: Close A FormView After Update?

Jul 29, 2010

I have a FormView that that implements all templates (Insert / Edit / Item). When a user updates the form and the operation completes successfully, I want the form to be closed.

I understand that the default behaviour of the FormView is that it returns to ReadOnly mode. I also understand that I can change the default mode so the view will not be ReadOnly, but Insert or Edit. However, I want a much simpler thing - just close the view alltogether (as if it was unbounded).

I tried to change the Visible attribute of the form to False (=Not Visible) at the OnItemUpdated event, but that created consequences errors (something about viewState.... don't want to go there...)

View 1 Replies

AJAX :: Unable To Write Anything When Update Progress Close?

Sep 1, 2010

Acctually I have done lots of coding on Page_Load of a page which comming from other page. So for that i tried to use ModalPopupExtender. but problem is that its working fine for button but how can i use it for Page_Load.

My scenario is:

protected void Page_Load(object sender, EventArgs e)
{
PleaseWaitPopup.Show();
//Lots of code and queries;

[Code]....

View 10 Replies

Web Forms :: Close Popup Window And Open Page In Parent Window?

Mar 10, 2011

I have a login page that is loaded in popup window (colorbox) and after user logs in it should be closed and parent window should be loaded with new page.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Do While reader.Read()
If Trim(reader("ZAP").ToString()) = Trim(textBoxZap.Text) Then
Session("A") = "1"
Response.Redirect("~/default.aspx")
Else
lblErr.Text = "incorect"
End If
Loop

So once the buton is clicked and user name and password is corect popup window should be closed and user redirected to default aspx.

View 1 Replies

How To Close All Threads On Browser Close Event

Dec 16, 2010

I have website which runs multiple threads. When user close the browser but threads are still running. How to kill/stop all thread in asp.net on browser close.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved