w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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 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

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

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

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

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

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

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

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#

Javascript to open new window in the same tab
... This seems weirdly trivial, but if you just want to redirect the user to a new page in the same tab, get rid of all your JavaScript and use a plain old <a> tag, where the href is set to the URL you want to go to. What you're describing is exactly the behaviour you get from a dead simple link, so I'm not sure why you don't just use one: <a href="/mypage.html">Click Here</a> If you have to run some JavaScript first, bind to the link's click event, and then don't return false or run event.preventDefault() inside your event handler, and the link will still be followed by the browser after your event handler is done. If you must to do the actual "redirection" in JavaScript for some reason, assign the URL to window.location instead of using window.open: window.location

Categories : Javascript

Javascript - Window open, use CDN
You're using protocol-relative URLs. However, since you don't pass a URL to window.open(), it displays about:blank. Therefore, it tries to load about://netdna.bootstrapcdn.com/..., which doesn't exist. You should use absolute URLs that include a protocol.

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

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

window.open is javascript or html?
The onclick attribute works more or so like this JavaSript. input.onclick = function() { // The code from the value. }; There is no requirement that the script element be present to run JavaScript. Some browsers are/were even stupid enough to execute JavaScript via CSS.

Categories : Javascript

javascript: open window and print
You should provide the full url when possible, else it tries to use the relative url. var printWindow = window.open('', '', 'width=1000,height=700'); would open a blank url var printWindow = window.open('print.aspx', '', 'width=1000,height=700'); opens page print.aspx relative to current url. So if current url is www.google.com, it opens www.google.com/print.aspx, which would be 404 page not found. Be careful of some sites which will redirect you, which can confuse you. For example if you run this on current stackoverflow page it would open this page itself because http://stackoverflow.com/questions/18633800/xxxxxx/print.aspx would redirect to http://stackoverflow.com/questions/18633800/xxxxxx Also the jquery wont work because you cannot copy content from one window to another through

Categories : Javascript

Need javascript to open site in new window
Just take out the &width=400px&height=400px if you don't want the window constrained. Also, I'd recommend removing the mouse events - I'm not sure what you're trying to do, but - as a user - I'd hate a window popping up every time I moused over/out of an element. My own preference there, but I think removing the width and height properties should get what you want, if I'm not mistaken.

Categories : Javascript

php & javascript open window function
Your JS action is to be on onclick action, not on href, try this elow code <a href="#" onclick="win1('<?php echo $j;?>')" onMouseOver="self.status='Open A Window'; return true;"><b>Open Window</b></a>

Categories : PHP

Javascript to open an actual window
Make a div and position it absolute so that this div will represent your window. Then make a function that represent an animation. Each time when it is called the function should make a tiny change to position and size of "window". Call this function at regular intervals with setTimeout and you will achieve animation. If mouse goes out you have to start rollback animation. Read a little bit more about JS times and u will write it. Also as advice always white times like this: setTimeout(func() { .... }, 1000); In this case func() will be called after 1000ms. So you can add this timer at the end of your function. Make your function to be called from func() and you will have the loop. Hope this help you

Categories : Javascript

Get a href value using JavaScript and open it new window
You can get DOM value using getElementByID().value document.getElementByID('LNK').value OR You can pass argument into your onClick function. onclick="clickLink(this.value)" and in function. function clickLink(value) { var myLink = value;

Categories : Javascript

Need form to open in new window, possibly via javascript
You can try putting your formtarget="_blank" in your submit input tag. Example: <input formtarget="_blank" class="big-search-submit" name="cmdSubmit" type="submit" value="Search">

Categories : Javascript

How to open window full screen using javascript
<script type="text/javascript"> window.onload = maxWindow; function maxWindow() { window.moveTo(0, 0); if (document.all) { top.window.resizeTo(screen.availWidth, screen.availHeight); } else if (document.layers || document.getElementById) { if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) { top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } } </script> Something like this in the page to be loaded. It's generally considered bad practice to resize browsers without notice really. You might want to read up on https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Using_

Categories : Javascript

Trying to use Javascript to open a new window from an old one and change an innerHTML in the latter
you could add a query string parameter to your links pointing to other parts of the book so that instead of <a href="page5.html">reference to page 5</a> you would have <a href="page5.html?reference=ref1">reference to page 5</a> and on page5.html you can highlight the reference with a span tag Lorem ipsum dolor sit amet, <span id="ref1">consectetur adipiscing elit</span>. and add script similar to this var refToHighlight = getQueryString("reference"); //you will have to write your own function to get qs data //removes the span and replaces it with a link $('#' + refToHighlight).replace('<a class="reference" href="#"/>'); //changes the link back to span when clicked $('.reference').click(function(){ $(this).contents().replace('<

Categories : Javascript

how to open html file from a directory new window using javascript
like suggested this opens the new html in the same window <a href="other_directory/no_js_needed.html">Link</a> this opens the html in a new window <a href="other_directory/no_js_needed.html" target="_blank">Link</a> javascript inline way same window <a href="other_directory/no_js_needed.html" onclick="location.href=this.href;return false">Link</a> javascript inline new window <a href="other_directory/no_js_needed.html" onclick="window.open(this.href);return false">Link</a> javascript in script tag function <script> function openlink(link){ location.href=link; } openlink('other_directory/no_js_needed.html'); </script> javascript in script tag function in a new window <script> function openinnewwindow(link){ w

Categories : Javascript

Window.open of JavaScript is acting before it gets to the Rails controller
When you fetch your infos on the Client side with Javascript, I guess you initialize the variables provider_id, therapeutic_class, etc. Something like this: var provider_id = $('#provider').val(); var thera_class = $('#therapeutic_class').val(); # etc. # and then you do: window.open("http://localhost:3000/pharmacy/patients?provider="+provider_id+"&"+"therapeutic_class="+thera_class+"&"+"medication_name="+medication_name); If yes, I would suggest you to do so: var url = "http://localhost:3000/pharmacy/patients?"; var params = { }; var params_names = [ 'provider', 'therapeutic_class', 'medication_name' ]; $.each(params_names, function(i, param_name) { var value = $('#'+param_name).val(); if(value !== undefined && value != '') { params[param_name] = value; } }) $

Categories : Ruby On Rails

Is it possible to open file upload window on click hypertext using javascript
I'm assuming you mean download, or this question makes no sense. You can link to a .zip or .7z file extension, or any file extension that your server or the browser won't try to interpret, or send the correct headers. See: http://webdesign.about.com/od/php/ht/force_download.htm

Categories : Javascript

I'm trying to use javascript to open a popup window. It works in Chrome but not in IE or Firefox
The issue is your target="". You don't need it if you're going to be using javascript popup code. This works fine: <a href="javascript:newPopup('buy-now/ambush-jacket.html');"><img src="images/banner/buy.gif"></a>

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

Javascript Onclick window.open Popup not working in Firefox and Safari
Try this code : function popwin(url) { window.open('', url, 'height=800, width=1000, top=500, left=200, scrollable=yes, menubar=yes, resizable=yes'); url.target =url; } And for link,use the same code javascript: onclick=popWin('http://www.weybridgestrategies.com/team/debra-porter-president-ceo'); return (false);

Categories : Javascript

How to avoid UrlReferrer error in asp .net when page called using javascript window.open
First of all I would try to discourage you for using UrlReferrer for security purposes. Idea behind this is you can call your page only from page on your domain. This is better achievable trough cookies as UrlReferrer has a browser-specific behaviour. Chrome or Firefox can process this differently than Internet Explorer. There is a similar question on SO that lead to nowhere: URL Referer not working on pop up windows What I would do if I were you - as part of var url = "View.aspx?ActivePageName=V&HeaderCode=" + HCode + "&Token=<%= EncryptedToken %>"; I would pass some security token, that will contain page name, Like (C#) : string EncryptedToken { get { return Encrypt(string.Format("/List.aspx,{0}", DateTime.Now.Ticks)); }} And on View.aspx (aside from UrlReferrer)

Categories : Javascript

Flex - Call JavaScript Function And Open a Popup Window that Displays Data
I figured this out and thought I would share it for anyone else experiencing this problem: In my Flex Code: if (ExternalInterface.available) { try { ExternalInterface.call("onPrintRequest", dataToPass); } catch (error:SecurityError) { Alert.show("Printing Security Error"); } catch (error:Error) { Alert.show("Printing Error"); } } else { Alert.show("Printing currently unavailable"); } In my index.template.html I added this JS method: <script type="text/javascript"> function onPrintRequest(val

Categories : Javascript

Open CV or alternative for post processing identification
You can use opencv for this. Opencv Hog descriptor may help you for this. Opencv can be used in rasberry pi as well. Here is the link for the people detection code, or you can find it in samples of the opencv package.

Categories : Python

Replace Page Links on Popup Page With Javascript to Open in Main (Parent) Window
You cant replace attribute target, from attribute href. use el.target and just set the value var aEls = document.getElementsByTagName('a'); for (var i = 0, aEl; aEl = aEls[i]; i++) { aEl.target="_parent"; }

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

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

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

Open Source alternative to Windows Identity Foundation
WIF deals mostly with SAML tokens and WS-Federation (websites) based identity federation. For other alternatives (OAuth, OpenId) there are various frameworks. One of them is DotNetOpenAuth. If your solution will be SAML based, I wouldn't bother too much with anything but WIF, unless you have a good reason (e.g. you are not running on Windows).

Categories : Authentication

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



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