popup

Wait for a user event [duplicate]

不羁岁月 提交于 2019-11-29 15:21:54
This question already has an answer here: How do I return the response from an asynchronous call? 36 answers I'm developing a javascript class (with jQuery) to create custom popup, but I can not figure out how to "pause" the script to wait for user response (click on the OK button or cancel) the class is like this: function Popup() { } Popup.Show = function(text) { var _response; /* code to draw the popup elements*/ $("#button-ok").on("click",function() { _response = "ok!" } return _response } if, for example, use it in an alert, the method always return "undefined", because it does not wait

popup for full calendar in jquery

佐手、 提交于 2019-11-29 15:18:19
问题 I need to show a popup (balloon popup as in google calendar) while creating an event in the jquery full calendar. Any best plugins for the popup which shows as balloon and also which handles the click events (which I am using to create/edit/delete events from popup)? 回答1: I've used QTip with fullCalendar and it's working great! $('#calendar').fullCalendar({ ... eventRender: function(event, element, view) { element.qtip({ content: "My Event: " + event.title }); } ... }); Just make sure you're

How do I pop up a custom form/dialog in a Greasemonkey script?

空扰寡人 提交于 2019-11-29 15:14:08
问题 I have been working on a script to use as a plugin in Firefox, and have come across the need to pop up a custom form when a certain button is clicked. I need to be able to create the entire form myself and then parse the entered data to render images on the original site. How do I do this? 回答1: Okay, here is a complete script example, showing how to pop up a form and interact with its controls. Note that it uses jQuery -- which makes it vastly easier/shorter/simpler. // ==UserScript== //

How can I check for an open URL in another window?

萝らか妹 提交于 2019-11-29 15:08:37
问题 This is a follow up to my last question Open a window if the window does not already exist Essentially, I am now keeping a list of all the window references that have been opened by a page, and only allowing them to be opened if they are not already open. Then a potential problem struck me - it is of course possible for a user to shut down the original window, and open it again, thus losing the list of window references. Is it possible to loop through the windows open in a browser, checking

Display portlet in pop-up Liferay

巧了我就是萌 提交于 2019-11-29 14:59:57
I am trying show a portlet (that previously I have created) from another one, but the pop-up is empty. First, I create the renderURL: <liferay-portlet:renderURL var="testPopupURL" portletName="<%=rule.getBannerPortletId() %>" windowState="<%=LiferayWindowState.POP_UP.toString() %>"></liferay-portlet:renderURL> and I do the link: <aui:a href="#" onClick="showPopup('${testPopupURL}')">View</aui:a> and this is the function showPopup: function showPopup(url){ console.log("En el showPopup "); AUI().ready('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) { window.myDialog = new A.Dialog({

Open a new popup window and post data to it

喜你入骨 提交于 2019-11-29 14:42:18
问题 I'm using jQuery to open a popup and I'd like to send it data using the post method when it opens. Can anyone help me, thanks in advance. I am currently passing the data using the get method so the data is a part in url, but I don't want the data to be visible in the url. function openWindow(){ var name = $('#name').val(); var url = 'popup_window.php?name='+name; window.open( url, 'popUpWindow', 'height=400, \ width=650, \ left=300, \ top=100, \ resizable=yes, \ scrollbars=yes, \ toolbar=yes,

Cannot pass arguments from the tkinter widget.after function

前提是你 提交于 2019-11-29 14:31:59
Part of the GUI I'm building using tkinter has a pop-up window that says "Please wait while the program is running." then after it finishes the window goes away. I'm using the widget.after command to open the window and run the command. However if I pass the function I call arguments then the pop up window never occurs. Here's an example: def backupWindow self.restoreCB = Toplevel() message = "Please wait while backup runs" Label(self.restoreCB, text=message, padx=100, pady=20).pack() widget.after(10, self.runBackup) def runBackup(self): <backup code> self.backupCB.destroy() This runs fine and

iOS 8 : Keyboard Extension. Issue with adding pop up of keys

故事扮演 提交于 2019-11-29 14:08:08
问题 I am building my Keyboard Extension app and i have added key pop animation on button when user tap on it. It works fine for inside image but for top row image pop up area become hidden as it clip the subview. I tried with ClipToBound property and set as False. But still not working. Anyone have any idea how to fix this? adding subview on superview also not works. Image A is showing correct pop up as it is inside frame of keyboard. Image B is wrong as pop up clip inside frame. 回答1: I don't

Show Jquery Popup Only Once

ぃ、小莉子 提交于 2019-11-29 13:01:14
I have a site where a user must login and once that is done they are directed to a new page and a pop up box appears. I have no problem displaying the popup box however if you refresh the page over and over the popup box appears. I want it to display only once they login and never again after that as long as they never sign out. This means if they re-fresh the page or anything like that the popup will NOT appear again. Is there some sort of plugin or easy code for this (I'm kind of a beginner in Jquery)? <div id="popup-image-back"> <div class="popup-textbox"> <div class="textbox-title">WE’VE

Watir: Need to double click on an element to open custom popup

痴心易碎 提交于 2019-11-29 12:44:44
I am a newbie in WATIR. The problem I am facing is - The application I am testing has thumbnails (like Windows icons) placed on the page and I need to double click it. On doing that, an custom popup (ajax popup implemented in javascript) will open. The fire_event("ondblclick") is not working for me. I also tried 'click' twice but that too is not helping. Is there any other way of handling this? Your help is highly appreciated. Added 6 July 2010: I solved it but I have another query now. Below was the HTML for which I was able to solve using "@ie.div(:class,'GridElementInlineIE').fire_event(