How to make window.open() pop up a sticky popup? - javascript

I am creating a program where i use popup with the help of javascript window.open(). It is working fine but i want to make it sticky popup. Here i try make you understand what i'm looking for. For ex. I have page called add_data.php in this page i have button called upload picture when i click upload picture button a popup appears where pircture can b uploaded. But i dont want to user allow to do anything on other tabs until upload picture tab is completed or closed. In other words i want to stick the picture upload popup.

There is no way to make a new browser window modal.
People doing this sort of thing generally use DOM manipulation to display new UI elements on top of the current page (which block accesses to the rest of the page using overlays and methods to disable access with the tab key etc).
There are lots of JavaScript libraries / UI frameworks that provide a modal.

Related

open new window as popup [html, js]

I'm not sure how to describe it properly but I will try.
Currently I have a page with stuff in it and I want to have a button that when pressed it will open a new window with more stuff in it that's part of the same "entity", meaning I want to transfer variables from the 2nd "pop-up" window to the first.
The idea is that I need a lot of space and one page isn't enough (no scrolling). So I want to have more divs in this new "pop-up" window. (If I make a regular div to be the popup I won't be able to drag it around outside the window)
In the following image is kinda what I want to have (The 2 monitors are just to make my request clearer)
All responses are appreciated
*I use pure JS

How can I use javascript to open a navigation pane in Adobe Acrobat DC?

Is there a way to use javascript in Adobe Acrobat DC to open a specific Navigation Pane? I've been struggling to find suitable documentation for this, so I'm asking here.
I've got a button that allows a user to attach documents to the PDF file, which works great. The issue here is that I can't set the attachments pane to stay open. I can execute the menu command to show/hide attachments, which works great for one attachment, but then as soon as you add the second attachment the pane closes, which is less than ideal (and then it opens with the third attachment, closes with the fourth, etc., etc.).
Is there a bit of code that can solve this issue, or some other setting in the document that will achieve the same effect automatically? Please note that my end users are not the most tech savvy of folks, so some way that minimizes button clicking to display the attachments is ideal.
I was researching the same problem and came across a solution using this undocumented function.
Right click on the button and go to Properties.
In the Actions tab, under Select Action choose Run a Java Script. Click Add and copy and paste this text:
this.viewState = {overViewMode:7};
It works perfectly.
Is there a way to use javascript in Adobe Acrobat DC to open a specific Navigation Pane?
No. Acrobat JavaScript cannot control the navigation panes.

chrome extension opens with page load

I need to create a chrome extension that for every web page te he user opens - he will have a button on top of the page (similar to the google translate extension - just that it will appear with page load, without the need to press a button) - preessing on it will do some activity.
from what i saw - the way to do it is to create a content script that will add an iframe that includes the button on the window.onload. just before i do that - i want to be sure there is no more simple way of doing that.
Thanks.
There is an experimental infobar API, but it's unknown when, if ever, it becomes stable.
As-is, you really need to inject your UI into the page DOM from a content script, with an iframe being a good solution to separate your UI from the page.
If it's just a button for each page then you could use a Browser Action
If you'd like for it to actually be in the page then an iframe is a good way to go.

How do pageActions and browserActions differ?

I'm a writing a chrome extension that allows users to do the following:
Load data into the popup when the icon is clicked
Change the data in the popup based on actions the user takes on the page
Append elements to the DOM of the page based on actions taken in the popup
It seems that I can accomplish 1 with a script in the browser_action field of the manifest, but perhaps I need a page_action script for 2 and 3?
The core of the problem is that I do not know exactly how browser_actions and page_actions differ from each other. My limited understanding is that page actions allow data populated in the popup to be manipulated dynamically. Is this true? I cannot find an explanation about the differences that makes sense to me.
Browser Action is a type of extensions that use icon on the right of address bar. You click on that icon and popup page is loading. Those extensions work regardless of page currently opened.
Page Action only works while certain webpage(s) is opened. It displays as an icon inside the address bar (near page URL). This is for extensions only working on certain websites.
If you want to make your extension working on every website, you should use browser_action.
For further information you may want to visit these pages:
http://developer.chrome.com/extensions/browserAction.html
http://developer.chrome.com/extensions/pageAction.html

Calling a JavaScript function on a CKeditor dialog instead of a popup window

I currently have a custom dialog within the link plugin that launches a popup with all the internal pages on my CMS for the user to pick and it inputs the url into the box
{type:'button',id:'browseInternal',label:i.browseWebsite,filebrowser:{action:'Browse',url:'/admin/pages/links'}}
However, I now use a popup modal window all over my system and would like the same modal style window to be used here. Any ideas on how I can implement it? I dont want to launch a popup window but instead the button needs to call this function
loadPopup( '/admin/pages/links', '', 'destination' );
After gathering my thoughts and a little more help from Google I eventially found the right page on the CKeditor docs see here

Categories

Resources