I have a problem where the modal popup is closed when signalr updates the parent web page. Is there any way to update the parent web page without closing the popup? Or even to not proceed with the update if a modal popup is open?
In my software signalr updates messages on the web page every minute, so when a modal popup is opened, it will be closed automatically in less than a minute.
I guess one solution would be in the client hub methods that display the messsages, I could try to detect if there are any open modal popups and not proceed with the update if any are found. How could I do that?
Related
I'm trying to cancel the load (basically, close the popup window during loading) if I detect that there is some problem. No internet connection to retrieve the data for the popup for instance.
await PopupNavigation.PopAsync() is what is in my Close method that I normally use, but it seems like it is getting called too early. I can still manually close the window by clicking on a Close button which invokes the Close method, but I don't want the users to have to do that.
Is there some way to abort the load, or get a notification when the page is done loading so I can programmatically exit it?
My Bootstrap modal popup is working fine. But my problem is that, my popup is opening an editProductImage.aspx page for image editing.
When I click on server side upload event, the modal popup is closed and editProductImage.aspx is opened in new window.
I want that modal popup to close after I click on the Close button. It should not close when uploading the image through the modal popup.
You are using server side control. That will cause a post back and refresh the page, if you want to keep the modal up, try posting the data from client side, using Ajax.
I have an asp.net page with a timer embedded in an UpdatePanel (UpdateMode="Conditional", ChildrenAsTriggers="false"). The timer is responsible for updating some components of that page every few seconds.
There are also some HyperLink controls on the page and they open a JQueryMobile dialog when clicked (data-rel="dialog"). The problem is that the timer i mentioned causes postback every few seconds. So when a dialog is opened and then closed, the first such postback after then causes the dialog to open once again.
Using the rel="external" as another attribute of the HyperLinks I mentioned solves the problem, but this is no solution for me. This causes full redirection to the dialog page instead of showing it using AJAX (as if on top of current page).
My idea was to stop the timer when any hyperlink is clicked. This solves the problem, but I have no idea how to start the timer again when the dialog closes. Is it possible to detect when a JQueryMobile dialog is closed? I know, this sounds stupid, but I can't come up with a better idea. Will you help me, please?
So basically, I don't want the JQueryMobile dialog page to show up for the second time after a timer tick. Could you please advise me how to achieve that?
jQuery Mobile with asp.net Web Forms and an UpdatePannel? This just sounds like a horrible combination.
jQuery Mobile and Web Forms fundamentally don't work well together. The specific issue that Web Forms requires a single <form /> element that wraps all controls (and most content). jQuery Mobile attempts to build up the DOM with "virtual" pages via ajax loading. This breaks the PostBack model by submitting the entire form instead of the individual form found within each page template. Now throw UpdatePanels in there...
Your only hope is go exclusively with Single page templates and to disable all ajax loading data-ajax="false" on both links and forms. And just say no to UpdatePanels.
asp.net MVC would give you much greater control over these issues.
Here is the problem: I have a HTML page called test.html and an ASPX page called getitem.aspx.
Now what I want to do is, upon clicking a button on test.html, I want the getitem.aspx page to open in a new dialog and allow entry on a text box. After clicking the OK button on getitem.aspx, this dialog should close and the entry should be passed back to the html page.
The issue is that the getitem.aspx has several buttons that trigger postback - but I only want the item from the text box to be sent back to test.html upon clicking of the OK button and not any other buttons.
How could I implement this?
You should use javascript to do that
first you need to use window.open() method to open the popup
after you have closed the page you should use window.opener for accessing to the closed windows and use javascript method like (getElementById) to find the element on that window and read it's value and then use !!
Hope it helps
How to extend the session time. There are many form in my application like parent and child forms. So how can I make pop up to appear when session times out and the pop up should appear on the form where the user is currently in, when popup comes I have to disable all forms like(they should be transparent (i.e) user should NOT be able to edit them).
how can i extend the session when I click on the OK button. Please can anyone suggest me
You can have a javascript timer running on the page when it loads. When it gets close to the session time out you fire a modal popup with a button to extend the session.
Using a javascript library like JQuery or JQuery UI would make the modal popup real easy to show.
The extender button can be a fake postback that automatically extend the session.
Here are some helpful links:
http://forums.asp.net/t/1136242.aspx
http://forums.asp.net/t/1471076.aspx
http://forums.asp.net/p/1207721/3094847.aspx
Any postback / request to the server will extend your session window.