First: there is no need to wrap return (false); you can simply do return false; Second: you can setup a flag at the top of your function to false and if all elements pass your validation, set it to true. At the end of the function, check if the flag...
javascript,jquery,python,web-crawler,window.open
I can suggest you use iframe for loading pages. For example: $.each($your-links, function(index, link) { var href = $(link).attr("href"); // your link preprocess logic ... var $iframe = $("<iframe />").appendTo($("body")); $iframe.attr("src", href).on("load", function() { var $bodyContent = $iframe.contents().find("body"); // check iframe content and remove iframe $iframe.remove(); } } But, I...
No you cannot. If I understand correctly, you want to detect if a user say for example goes to Yahoo! or Facebook (a site separate from your own) and if they decide to close that window, then do something or get some information out of it. Perhaps if the links...
javascript,angularjs,popup,window.open
var data = { name: 'name', info:{ info1: 'uvbiuonns', info2: 'aisbsiece', } } var qs = function(obj, prefix){ var str = []; for (var p in obj) { var k = prefix ? prefix + "[" + p + "]" : p, v = obj[k]; str.push(angular.isObject(v) ? qs(v, k) :...
This should work (wrapping the window.open calls in anonymous functions) <script> function disableSubmit() { document.getElementById("submit").disabled = true; } function activateBox(element) { if(element.checked) { document.getElementById("submit").disabled = false; document.getElementById("submit").value = "Press here to go online"; document.getElementById("submit").onclick= function() { window.open('<?php print $grant_url ?>'); } document.getElementById("submit").ontouchstart= function() { window.open('<?php print...
javascript,php,html,popup,window.open
You need to add single quotes to the JavaScript function call: <?php $sell_code = $row['sell_code']; ?> <input type="button" value="Renovaciones" onClick="goNewWin('<?php echo $sell_code]; ?>')"> Without it, Javascript will consider your $row['sell_code'] as a javascript keyword. You need to pass it as a string (function parameter). Reference...
javascript,html,forms,window.open
You can't get 'results' in the manner you're attempting. You'll need to try getting it via the ID reference, something like the following: <form name="myForm" onSubmit="return myfunction();"> <input type="text" id="firstfield" name="firstfield"/> ... repreated 7 more times... <input type="submit" value="Preview"/> <input type="submit" onClick="window.open(document.getElementById('firstField').value + '/' + document.getElementById('results').value);" value="Open"/> </form> /* Hidden...
javascript,jquery,form-submit,window.open,window.opener
This would be helpful for others in the future. I was able to achieve this myself by just modifying the above code to the code given below: // parent window handling of information returned from the pop-up window function HandlePopupResult(value) { alert("The field value is: " + value); $("input[value='Search']").trigger("click"); }...
try like this:use _blank for new tab window.open(downloadLink.href,'_blank'); ...
javascript,tabs,window.open,window.location
You cant just replace window.location with window.open. It's syntax is slightly different. http://www.w3schools.com/jsref/met_win_open.asp Try replacing: images[i].onclick=new Function("window.location='"+params.links[i]+"'"); With: images[i].onclick=new Function("window.open("'+params.links[i]+'")"); ...
javascript,jquery,settimeout,window.open
Your code is just not right. myWindow is a string variable. You're trying to call myWindow.window.open(). This would generate a script error because myWindow (a string variable) does not have a window property. Perhaps what you mean to do is this: var myWindowURL = "image.png", myWindowName = "ONE"; var myWindowProperties...
java,javascript,jsp,ftp,window.open
For security reasons, browser windows with different domains can't see each other (same origin policy). On top of that, the ftp protocol doesn't support any kind of JavaScript which would allow you to track what the user does. That leaves you with two options: Analyze the log files of the...
I'm pretty sure window.open is a function, so you want: window.open('/Client/ReleaseForm'); Also, it's probably even better to set an event handler in JavaScript code and not inline. <button id="print" type="button" class="btn btn-primary"> View/Print Release Form </button> <!-- Elsewhere, in a JS file --> document.getElementById('print') .addEventListener('click', function viewOrPrintReleaseForm() { window.open('/Client/ReleaseForm'); });...
You will have to separate the javascript from the markup. That's a common best practice for developing in HTML/Javascript. I've put an example in jsfiddle: HTML: <h1>New Window properties</h1> <div> <label for="windowWidth">Width:</label><br /> <input id="windowWidth" type="number" value="200" /> </div> <div> <label for="windowHeight">Height:</label><br /> <input id="windowHeight" type="number" value="200" /> </div> <div>...
javascript,html,google-chrome,internet-explorer,window.open
Try this out, also try to rename your variable top, I think javascript read this as a keyword. var str = "width=" + img.width + ",height=" + img.height + ",top=" + tops + ",left=" + left + ",status=0, scrollbars=0, resizable=0 "; ...
javascript,jquery,html,window.open
Try to open the window inside of a load function, $(function() { $("a.popup3").click(function(){ var asrc = $(this).attr("href"); var image = new Image(); image.src = asrc; image.onload = function() { window.open(image.src,"Image","width="+image.width+",height="+image.height); }; return false; }); }); ...
Just use the <browser> element <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="main" title="My App" width="500" height="500" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://myapp/content/main.js"/> <vbox id="browerbox" flex="1"> <browser flex="1" id="testbrowser" src="http://www.test.com/ /> </vbox> </window> The browser is very powerful element I would...
javascript,checkbox,radio-button,window.open
the showSize() and the showToppings() methods are both returning true in the end which is why you're getting true in your string. you should return msg and your problem will be solved.
Keep the following in mind: Your 2 calls to the openWindow() function will create 2 identical forms along with the javascript blocks below it. Since you have hardcoded the id of the form to be 'TheForm', it is illegal, since the element id should be unique in the DOM. Hence...
javascript,phantomjs,window.open
There seem to be three ways to do this: onPageCreated CasperJS solves this by using page.onPageCreated. So when window.open is called in the page, a new page is created and page.onPageCreated is triggered with the newly created page. page.open(address, function (status) { if (status !== 'success') { console.log('Unable to load...
javascript,delay,window.open,immediate-window
Yes you can, it's waiting because you're putting it in the window.onload handler, which, well... waits for the entire window (and its resources) to finish loading. However, even if you do wait for the onload handler, the popup will be blocked by popup blockers. The only safe way to open...
You may save a reference to the window, when opening it. The window.open method returns a windowObjectReference. With this reference, you can check if the window is closed (closed property, a boolean) or simply if the window is null (window property, which will be a Window object or null, if...
Session state and forms authentication are 2 different things, and each one has a separate cookie. Session state has nothing to do with whether or not the user is logged in. You should be adjusting the Forms Authentication cookie settings if you want each application to have a separate cookie...
angularjs,popup,window,window.open
$window.open is really just the same as window.open, which doesn't have much to do with angular. In terms of opening in a new window or tab, that is up to the user, and the settings they have initialised with their browser. Also the same goes for anchor links with target="_blank"....