I have several links in a page that opens a popup window to display the contents of these links.
On Chrome when I click on a link (see code below) the popup window appears front and when I click on a second link, the content changes and the popup its still front: This is the behavior I want to have.
But with Firefox and IE, when I click on the first link the popup appears and when I click on the second link, the content changes but the popup window is minimized.
How to have the same behavior as Chrome on Firefox and IE?
Here's the code:
function openpopup(popurl,winName){
winpops=window.open(popurl,winName,'toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=1020px,height=300px,left=125px,top=300px,scrollbars=yes').focus();
}
centent1
centent2
I edit the message to not create a second topic.
With IE the text displayed in the popup window does not contain newlines, it is unreadable. Is there something to add more for proper formatting?
Simply add .focus()
function openpopup(popurl,winName){
winpops=window.open(popurl,winName,'toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=1020px,height=300px,left=125px,top=300px,scrollbars=yes',true)
winpops.focus();
}
Related
I am currently using HTML, JS and CSS to create a chrome extension.
Once a button has been pressed, I would like a modal pop up to appear in the bottom right hand corner of the screen.
So far, the pop up only appears inside the default pop up for the extension rather than on the actual page.
I have added the html for the modal inside a div in the "default_popup" referred to in manifest.json. Everything works apart from where it appears.
Thanks for your time.
For a project I'm building an safari extension. One part of the extension contains the popover part.
When someone clicks the extension toolbar button, a popover window scrolls down to display some information.
This is working as expected but now the following:
The plan is to make some sort of companion popover, so when the user clicks inside a webpage, some elements are selected and displayed in the popover.
The problem is the popover closes when one clicks next to the popover window while it should be left open.
Does anybody know a way to keep the popover window open while browsing pages?
There is a function on the window object:
window.onblur
Which fires an event when the popover closes. Is there a way to cancel the closing operation?
I have a page with a link that opens a new window with a div and an iframe. The user can navigate through the web that it's inside the iframe and the div shows information.
The user wants an option to go back on pages that he visited inside the iframe, so I put an image on the div to allow that option. The image has the onClick event that calls history.back() method.
The problem that I have it's that in Firefox when I try to go a page back, the iframe stills showing the page that I'm seeing but if I try in Chrome it works great, I can visit all the sections that has my page and I can go back clicking on that image.
I tried to use the browser's context menu but in Firefox does nothing.
I am opening a popup after main window load.
Problem:
When user actually click on link the popup opens without complaining anything.
But when I am using Javascript call to click on href, I am getting popup blocker.
I am suspecting that, browser identifies that, popup is opening without any actual operation by user and that's why it is blocking popup.
In herf, I am calling a javascript method to open the popup.
I searched all the questions regarding opening popup and simulating the click like this, these works fine to simulate the click but still getting popup blocker.
Is there any workaround to fool browser?
You can't fool the browser per-se in this scenario. You could however, launch a div as an overlay on the main window if that's an option.
i am opening the popup window with below code snippet
self.open('myJSPPage','ServicePopUp','height=600,width=800,resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes');
Once the window opens i do not see any back button or forward button on popup. I just see title then address bar under it and then myJSPPage under address bar.
I am not getting how to show back and forward button on popup?
Edit:- i am using google crome. Looks like above code working on IE
i tested this example and it gives me forward and back button on FF
try this
<!-- Codes by Quackit.com -->
<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(
url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>
Open a popup window
jsfiddle live demo for your code an mine it gave me buttons on FF test
update:
yes you are right chrome does not give the result expected
possible duplicate
another asked question in stack over flow
Unfortunately Chrome only supports a small set of window features when using window.open. If you believe that this is a bug or an issue you can file it at http://crbug.com.
If you just use window.open(url) then it will open a new tab in the same window with the buttons you desire.
jsfiddle demo