How to control a popup window in dart - dart

I wonder if it is possible in dart to open a popup window and then control it from the opener context.
What I would like is to open a popup window, and then control it's content and event from the script that opened it.
The propblem is that window.open only returns a WindowBase, that can only close the popup, nothing more.
So, is it doable ?

I can't test right now but this should work:
var w = window.open(...);
w.document.body.innerHtml = 'from parent';
This of course won't work if the opened site is not in the same origin.
If it's a site you control, you could pass in a parameter in the URL that you can then read and act on.

A div with a high z-index and the right positioning and styling could function as a popup window easy to manipulate.

Related

imacros changing focus to second firefox window

We are trying to create a script that can click on a button that appears in a second window (not a tab in the same window) but do not seem to be able to get iMacros to change its focus to a new window.
Can iMacros cross browser windows in a single script?
The webpage flow is:
- browser window directed to a URL
- Click a button in that page
- a new window is opened
- click a button in that window
You can try to make the browser show this pop-up in a new tab of the same window.
Let's suppose that your button html code looks like this:
<button id="popupbut" onclick="window.open('http://popupUrlHere', '', 'width=300,height=300,left=50,top=50,menubar=no');">New window</button>
So, here is a macro to do the above mentioned thing:
SET !EXTRACT_TEST_POPUP NO
TAG XPATH="id('popupbut')" EXTRACT=HTM
SET popupUrl EVAL("'{{!EXTRACT}}'.match(/(http:.+?)['"]/)[1];")
TAB OPEN
TAB T=2
URL GOTO={{popupUrl}}
I think this direction should be right.

How to make Browser Window draggable?

I have a Browser Window (using Electron.atom.io) and I'm trying to make it so that you can click over most of the screen (except inputs, etc) and drag it over your desktop - basically, I don't want to restrict drag just to the title bar.
Does anyone know how I might be able to do this?
Electron supports a webkit property intended for frameless windows, that I believe should work for you. The documentation is here. Basically just make a class and add it to any elements you want draggable:
.draggable {
-webkit-app-region: drag;
}

open popup through Link in Vaadin

I am Using Vaadin Framework in my application. I want to open a popup screen using Vaadin Link. I know to open popup thrugh button but I need to open popup through Link. Can anybody help, this is my code:
Link link1 = new Link(String.valueOf(rs.getInt(1)), new ExternalResource("#"));
_reportTable.getItem(dashboardDataRowId)
.getItemProperty("todo").setValue(link1);
As explained in in Book of Vaadin - Components - Link, Link should be used only for hyperlinks to external resources, as it is nothing more than a wrapper for a anchor html tag and as such it does not fire any server side events. As a result you cannot react on server side to open a popup window or do some other logic.
The Link is a regular HTML hyperlink, that is, an anchor
element that is handled natively by the browser. Unlike when clicking
a Button, clicking a Link does not cause an event on the server-side.
What you really want is vaadin button styled as a hyperlink. You can do it by creating a regular button (which supoorts server side events and can open your popup) and then adding an appropriate style.
Button linkButton = new Button();
linkButton .setStyleName(BaseTheme.BUTTON_LINK);
Always be sure to call addStyleName() instead of setStyleName() as it only adds your new style to the list of other styles already present and it does not override that list with your only new style.

Prevent Chrome for iOS from opening "Open in New Tab .. Copy Link URL" pop-up

I use jQuery Mobile to provide the foundation for a web-based application in-which there are a number of input elements - a, input, button, etc. In Chrome 38.0 on iOS 8, the elements work fine ... unless you touch and hold the element for over 1 second - which will then cause the browser to open a pop-up prompt for "Open in New Tab, Open in New Incognito* Tab, Copy Link URL".
While you can close the pop-up by touching anywhere else on the screen - it is incredibly annoying when using the slider controls () and other elements that you touch and 'hold'.
Any suggestions for how to remove this behavior or disable?
Thanks in-advance.
The solution is to set the -webkit-touch-callout CSS property to 'none' for the element(s) ... or for the body to remove for all elements on the page.
In my case, I added
body {-webkit-touch-callout: none;}
to remove the 'feature' for the entire page.
THANK YOU to rob mayoff for his answer at https://stackoverflow.com/a/9145259/2852050.

how to set action url and change css

I have a button that when pressed opens a window on the screen
Is there a way I can get the window to open automatically with a URL?
An example of this site http://karevn.com/ have the button FEEDBEACK
I want the window will open only with a command URL
The site you mentioned is using this plugin -> http://wordpress.org/extend/plugins/usernoise/
However the plugin is not upto date so just test it before using it on yours taking a back up copy of the files/database.
karevn use a jquery plugin like the FancyBox ( see the ajax part or iframe in this page http://fancybox.net )
Open a window with a hyperlink
How to open a new window when clicking a hyperlink?
If you want the feedback button then
http://www.script-tutorials.com/css3-modal-popups/
Goodluck

Resources