w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Bookmarklet window gets blocked if I try to do anything besides open a new window
I assume that the difference is that i'm doing some parsing in the first example No, the problem is the asynchronous AJAX. The browser tries to determine if a user action initiated a new window or not before deciding to block it or not. For the new window to open without blocking, there must be a "direct line of action" between the user click and the window opening. The async AJAX breaks that direct line. (Synchronous AJAX might work, I'm not sure.) Is there a way to have my cake and eat it too? There is no perfect solution, but an improvement over what you have now is to create a pop-over div on the page with a link similar to <a href="http://localhost:3000/bmfeed?targ=..." target="_blank">click here to open the new window</a>.

Categories : Javascript

How to open a new window/tab without user interfaction and without getting it blocked
Solution The standard (even though it's not implemented in every browser) event when pressing ENTER or RETURN with a form element or its children selected will be to trigger the submit event of it. Automated Alternative If you want this event to be called automatically you can do it with JavaScript: /*Directly selecting the form by its formIndex*/ document.forms[0].submit(); /* --- */ /* selecting the form by ID */ document.getElementById('myForm').submit();

Categories : Javascript

Passing Data to an open window|Capture window open event
If you want a very simple way to do something after that window loads, you can listen to DOMContentLoaded event and then check if you are on the desired page, like so: window.addEventListener("DOMContentLoaded", function() { if (gBrowser.currentURI.spec.indexOf(URL_OF_SPECIFIC_WINDOW_YOU_WANT) != -1) { // Do your processing here } }, false); I'm doing the indexOf instead of == so you can put just some part of the page url in there and it will work.

Categories : Javascript

Django app is blocked when calling linux ping
Use cmd = "ping -c 1 %s -W 2" % host -W is for timeout. It is not a python issue. The command blocks EDIT: It works fine. try this Code: import os host="10.13.1.23" def verify_host(host): cmd = "ping -c 1 -W 5 %s" % host if os.system(cmd): return False return True print verify_host(host) Output: $python file.py PING 10.13.1.23 (10.13.1.23) 56(84) bytes of data. --- 10.13.1.23 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms False

Categories : Python

Meteor callback on window.open(url) does not open window
Its likely this is being caught by chrome/safari's anti popup filter. You probably want to use the new window in a non malicious way, but modern browsers need user input to be able to open a new window. In a callback there isn't a user input 'trigger', so the browser might think its a popup/ad. There really isn't much of a way to get passed this. You could create a new button when the callback is run, then ask the user to click it to open a new window.

Categories : Javascript

Using Window.Open instead of Response.Redirect to open new window?
Use this class. ResponseHelper .Redirect("popup.aspx", "_blank", "menubar=0,width=100,height=100"); public static class ResponseHelper { public static void Redirect(string url, string target, string windowFeatures) { HttpContext context = HttpContext.Current; if ((String.IsNullOrEmpty(target) || target.Equals("_self", StringComparison.OrdinalIgnoreCase)) && String.IsNullOrEmpty(windowFeatures)) { context.Response.Redirect(url); } else { Page page = (Page)context.Handler; if (page == null) { throw new InvalidOperationException( "Cannot redirect to new window outside Page context."); } url = page.ResolveClientUrl(url); string script; if (!String.IsNullOrEmpty(win

Categories : C#

What is an alternative way to open a modal window instead of window.open?
You could use window.open to create a modal window, but it can get pretty messy. You would be better off using a modal plugin for the requirements you have. I would suggest using Bootstrap, I use this for all my modals. Easy as to implement and style. http://getbootstrap.com/2.3.2/javascript.html#modals To open another url in the modal, you could use an iframe in the modal to open up the url you need, something like this. http://bootply.com/61676

Categories : Jquery

javascript/jquery : Window.open opens child window but after few seconds child window get automatically closed for some urls(for IE and chrome)
It's because this code is executed on init on https://wpc.gcsip.com/wpc/wpc page // check that this page is not in a subwindow (e.g. after a session time out) if ( window.opener ) { window.opener.location = "wpc"; window.opener.focus(); window.close(); }

Categories : Javascript

open the link from the popup window in an external window and then close the original popup window
Try <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';$.colorbox.close();"> or <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';parent.$.colorbox.close();">

Categories : Javascript

How to reload the parent window from a pop-up window by calling a JS function?
Window Launcher: <script type="text/javascript"> function launch() { window.open('opened.html'); } </script> <a href="#" onclick="launch()">Launch!</a> Launched Window: <script type="text/javascript"> function reload_parent() { parent.window.opener.document.location.reload(); } </script> <a href="#" onclick="reload_parent()">Reload!</a> This kind of problem does not lend itself nicely to jsfiddle.net, and can't be done on file:/// domain due to cross-domain security problems, so you will have to actually run a server to host this. localhost is fine. I have hosted it myself here for you to see: http://framba.ch/opener.html

Categories : Javascript

How to close window programmatically after calling window.showdialog?
When you launch the dialog using ShowDialog, the control goes to the newly opened dialog. So you need to do the close operation in the launched dialog. Alternatively, you can try window.Show(); Thread.Sleep(10000); window.Close(); DoEvents();

Categories : C#

Javascript Window.Open how to obtain the opened child window from a different page
First its seen little bit tricky.. you declare some ajax function to send information to server whether child window opened or not.. if child window opened then refresh page. for E.g . -> assume that user opened 2 same page In different tabs1 and tab2. -> user opened opened popup window on tab2 and add/change some information.. -> tab2 content refresh as per ur event. you should also send a one flag to server with session id and tab1 continuous check is that any changes happed to server it will be refresh..

Categories : Javascript

window dot open hides half the newly opened window
Try something like below: function openPopup(url) { var x = screen.width/2 - 700/2; var y = screen.height/2 - 450/2; window.open(url, 'Test','height=485,width=700,left='+x+',top='+y); }

Categories : Javascript

chrome is opening window.open() in full window mode.
Maybe you can check your browser settings because I am in Chrome and the JSFiddle code worked perfectly fine for me. The browser opened with width 400 and height 200. Also, check your actual code to make sure it is the same as the one you posted.

Categories : Javascript

Disable parent window when child popup window is open
Play around with this code in the pop-up: $(window).on("blur", function(){ ... }); This will fire every time the user leaves the window. Inside the argument function you should be able to make the window regain its focus, maybe using $(this).focus() or self.focus(). I haven't tested this myself. Good luck!

Categories : Javascript

Close a tkinter progressbar window while matplotlib window is open
You are getting conflicting gui-main loops between the TK you are starting and the TK that plt is start. If you want to use matplotlib with your own gui, you must embed it your self and you can not import pyplot. All the behind the scenes magic that makes the pyplot interface wonderful is what is messing you up here. For a tutorial see here, for how mpl does the embedding see here. Also see: Unable to save matplotlib.figure Figure, canvas is None Python Matplotlib runtime error upon closing the console Matplotlib bar chart in a wx Frame instead of a new window

Categories : Python

Javascript window.open function to open all urls in a json feed
for(var i=0; i<len; i++) { links[i].addEventListener('click', function(e){ window.open(this.href, '_blank', 'location=yes'); e.preventDefault(); }); }

Categories : Javascript

Window.open in GWT not open correctly with in a call back function
The problem is popup blocker. When you click on a element you can open a new window since the browser considers it is a deliberate user action to open the window. Otherwise, the browser blocks any window.open in asynchronous blocks, because it considers that it could be malicious code run out of the user control. The best solution, is to open the file in an iframe, but you have to set the appropriate content-disposition header in server side which causes the browser to show the "Save" dialog. Client Code: // Create a new iframe final Frame f = new Frame(); f.setUrl(url_to_my_excel_file"); // Set a size of 0px unless you want the file be displayed in it // For .html images .pdf, etc. you must configure your servlet // to send the Content-Disposition header f.setSize("0

Categories : Java

Trying to open a file with Eclipe - eclipse.exe isn't added to the Open With: window
You should not use the .project file to start Eclipse. Start eclipse from the main start menu shortcut or eclipse.exe. Then select the workspace (browse to it) you want to work in (and that contains your project). If your project is not in a workspace, import it with the eclipse import menu.

Categories : Java

Jquery not to open popups in hover with window.open and mousenter
What are you trying to do is not possible, you are trying to bind 2 different events, however if you are going to click the mouse will have to hover it first, you can't avoid that, I suggest reevaluating your strategy, maybe adding a different link to trigger your pop up or changing classes and triggering different events depending on which class is hovered or clicked.

Categories : Jquery

Calling https version of TYPO3: content (css, js, ..) is blocked because link to http version
I used config { baseURL = https://domain.com } and adapted all links which had a http in the beginning (otherwise the slider stopped working because Chrome didn't load the other ressources ...). Seems to work now.

Categories : Http

Calling Focus on textbox in window 'x' causes the window 'x ' to be top most
I believe that this is the normal focus behaviour. If you were to manually click in the TextBox to focus it, that window would become the focused window. There are a few things that you could try to get around this. Have you tried setting ErrorWindow.TopMost = true and MainWindow.TopMost = false? You could try displaying the errors in the first window instead... the users would probably prefer this too.

Categories : Wpf

25 WPF Calendars in one window, takes 5 seconds to open Window
This will give you an idea of what a calendar is versus a button using Snoop. Yes, we do expect a lot of calendars to take a lot more rendering time. If you need to use a lot of them, I'd attempt to create your own that's simpler and/or virtualize them Heres a button, 3 children... And heres a Calendar, 522 children. Notice each of the CalendarButtons I didn't expand still have 9 children each

Categories : C#

Reset window.open specs in popup window
Specify scrollbars=1 and specify width and height, that way the scrollbars would show when the content is larger than the specified window width and height. window.open("...url...", "...blah...", "scrollbars=1,width=600,height=600")

Categories : Javascript

IE11 on WIN 8.1 : window.open with the same name is opening new popup window
Please try this.. this will check the window is still open or closed.. <script type="text/javascript"> var myWindow = null; if(!myWindow || (myWindow && myWindow.closed)){ myWindow = window.open("http://www.google.com", "test", "resizable=no,scrollbars=yes,width=260,height=225"); } else{ myWindow.location.href = 'http://www.google.com'; } </script>

Categories : Javascript

window.open does not reuse existing named window?
In the Internet Zone (which is where your code runs when you use a fully-qualified-domain-name like servername.domain.com) your code has restricted permissions. In the Intranet Zone (which is where your code runs when you use a dotless hostname like servername) there are fewer restrictions on permissions. The problem you're encountering is that in the Internet Zone, a named window launched from site "A" may not be navigated by JavaScript from site "B"-- instead a new window is created. We introduced this change in IE8 for security reasons, and it matches other browsers and what HTML5 demands. See http://msdn.microsoft.com/en-us/library/dd565638(v=vs.85).aspx for more information.

Categories : Javascript

close window and open a new window titanium alloy
You define your window in XML, say mycoolwindow.xml. Then from some other part of your code: var win=Alloy.createController('mycoolwindow').getView(); win.open(); See example here: https://github.com/ricardoalcocer/AlloyOpenWindow or go to this link: http://www.youtube.com/watch?v=CB26lUj0UBQ

Categories : Javascript

How to open and grab a window over TopLevel window
We can do like this: sub AnotherWindow { $window_over_top_level =$new_wind->Toplevel(-title => "Window Over Top Level With Grab"); $window_over_top_level->geometry( "270x380"); $window_over_top_level->grab; }

Categories : Perl

window.location vs window.open issue
Remove that extra ; window.open($(this).val()); Demo ---> http://jsfiddle.net/PqXWJ/21/show/

Categories : Javascript

window.open sends the current window to 0
You need to put it in an onclick event. You need to also add in return false; to stop the browser from following the link. <a href="#" onclick="window.open('someurl','_blank'); return false;">Link</a> jsFiddle of it working. Here's another, slightly cleaner way to do it: <a id="link" href="#">Link</a> <script type="text/javascript"> var link = document.getElementById("link"); link.onclick = function() { window.open('someurl','_blank'); return false; } </script> I don't know your scenario, but this is probably the ideal way to do it: <a target="_blank" href="someurl">Link</a> Clean and simple, and it does the exact same thing.

Categories : Javascript

Can window.open open multiple tabs at once?
There's no concept of tab in standard DOM. In fact when you ask the browser to open a window it might be a tab, depending on the browser and user settings. So, apart writing extensions that the user will have to install, no, you can't do that.

Categories : Javascript

Open a new javascript window(.open) along with its CSS styling
Build a complete HTML page in the opened window and reference your CSS-file there: var win = window.open('','printwindow'); win.document.write('<html><head><title>Print it!</title><link rel="stylesheet" type="text/css" href="styles.css"></head><body>'); win.document.write($("#content").html()); win.document.write('</body></html>'); win.print(); win.close();

Categories : Javascript

window.open using JQuery wont open a JSP in a pop-up
To "make sure that strUrl location is right", open a new window or tab in your browser, paste http://localhost:8085/reports/popupData.jsp in the address bar and hit Enter. If you can navigate to the page manually, then strUrl is correct. You may be running into browser security issues, or pop-up blockers, as you are dealing with pop-up windows. A larger issue is that, with modern browsers, you cannot programmatically control whether your pop-up is opened in a new window or a new tab. This is left completely up to the control of the user. The good news is that you've tagged this question as jQueryUI, so you have access to the jQuery UI Dialog widget. A simple change to your existing markup: <input type="button" id="showLanguage" value="OPEN" /> <div id="dlg"></div> an

Categories : Javascript

How to populate listbox with a list of all open forms
My.Application.OpenForms is a collection of the open forms in your project. So something like: For Each f As Form In My.Application.OpenForms Me.SomeListBox.Items.Add(f) Next Then to close the selected item, it’s DirectCast(Me.SomeListBox.SelectedItem, Form).Close()

Categories : Vb.Net

Open new form after selecting item on listbox
You will need to use the ListBox's SelectedItem Property: private void button1_Click(object sender, EventArgs e) { switch (listBox1.SelectedItem.ToString()) { case "House": House h = new House(); h.ShowDialog(); break; case "People": People p = new People(); p.ShowDialog(); break; case "Outdoor": Outdoor o = new Outdoor(); o.ShowDialog(); break; } }

Categories : C#

how to get open window instance from a third window
I don't think it's possible. Because of the same origin policy, you can't communicate between window 2 and window 1 and 3. So window 1 and 3 can't communicate. Unless you're using some session or cookies, but it's outside the scope of you question if I'm not mistaken.

Categories : Javascript

Why does window open sometimes open a new tab and sometimes a popup?
Check out this response from another question. When a javascript event is initiated by the user, open() opens the link in a new tab. Otherwise, it's opened in a popup window. So if the user clicks something that triggers open(), a new tab will open. If you set a timeout or try to open a link after some other event, like an ajax response, a new window will open.

Categories : Javascript

Foundation 4 Reveal and WP AJAX: Previous/Next Modal Window from Open Modal Window?
I figure that someone here probably knows a much better way to do this, but for the sake of anyone else that is trying to figure this out, I managed to kludge a solution. It works, though I haven't tested it thoroughly. The function extends Foundation 4 Reveal's functionality in a few ways: Uses WordPress AJAX to dynamically pull in content to populate a modal div. Centers the modal div and allows it to be variable width. Adds paging navigation from the modal window that when triggered will close the open modal window, then open the previous/next modal content. Here's the code: (function($) { $.fn.displayPost = function() { event.preventDefault(); var post_id = $(this).data("id"); var id = "#" + post_id; // Check if the reveal modal for the specific post id do

Categories : Jquery

How to let Org-mode open a link like [[file://file.org]] in current window instead of default in other window?
You need to change the value of org-link-frame-setup. Default value contains the cons (file . find-file-other-window). You may replace it by (file . find-file).

Categories : Emacs

To open a little pop up window on a click to display html content on ie8. Not all content is seen in the window
You could try sizeToContent(): abcd.sizeToContent(); but it's not likely to work. Modern browsers allow the user to assert complete authority over: when a new browser window gets opened what controls it will have what size it will be From MDN's FAQ about window.open How do I resize a window to fit its content? You can not reliably because the users can prevent the window from being resized by unchecking the Edit/Preferences/Advanced/Scripts & Plug-ins/Allow Scripts to/ Move or resize existing windows checkbox in Mozilla or Tools/Options.../Content tab/Enable Javascript/Advanced button/Move or resize existing windows checkbox in Firefox or by setting dom.disable_window_move_resize to true in about:config or by editing accordingly their user.js file. There's more to rea

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.