w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Firefox Document Inspector, Firebug & Webkit Developer Tools (Chrome/Safari) not updating HTML to reflect checked status of checkboxes loaded via AJAX
After a careful review of the W3C standards surrounding this issue, it seems clear that this is a browser bug (albeit not a serious one). The discrepancy exists because the non-AJAX method being used was presumably chosen to be more "friendly" and maintain consistency between the code and the presentation, whereas the AJAX method is more respectful of the true W3C specification. Such is the result of any collaborative development effort. For those who are hoping to avoid any such inconsistencies, I recommend you use the following syntax: $('#some-id').prop('checked', true); // Preferred method for checking a box or radio button ... instead of: /* DON'T USE THIS CODE! $('#some-id').attr('checked', 'checked'); // Deprecated method for checking a box or radio button IF YOU DO, IT'S ON YO

Categories : Javascript

Browsers Don't Display "Cruftless" links (no index.html for local web dev.)
The meaning of file: URLs is, by definition, system-dependent. Normally browsers map them to files in the file system in a relatively straightforward manner. Thus, a link with href value like file:///JOBS/ABC/About/ may or may not work, depending on system. It may fail, or it may open a generated document containing a directory (folder) listing, or it might do something else. There is normally no need to get around this, and it is pointless to worry about SEO when dealing with local files. This could, however, matter during site development when you work with a site locally (and perhaps test and demonstrate it locally). Then you might wish to have, say, <a href="About/">About us</a> so that it works locally as well as on a server, yielding About/index.html in both cases but

Categories : HTML

Where should I locate resource to be loaded by java.util.ResourceBundle?
From the getBundle doc of ResourceBundle: *....getBundle then iterates over the candidate bundle names to find the first one for which it can instantiate an actual resource bundle. For each candidate bundle name, it attempts to create a resource bundle: First, it attempts to load a class using the candidate bundle name. If such a class can be found and loaded using the specified class loader, is assignment compatible with ResourceBundle, is accessible from ResourceBundle, and can be instantiated, getBundle creates a new instance of this class and uses it as the result resource bundle. Otherwise, getBundle attempts to locate a property resource file. It generates a path name from the candidate bundle name by replacing all "." characters with "/" and appending the string ".properties". It

Categories : Java

How images are loaded into browsers?
In both situations, the full image has to be downloaded by the client, so load times will be equal. And if you really care: the first image will show up few microseconds later, because it needs to be rescaled first before presenting it to the user. Depending if you use a server-side scripting technology, you could rescale and cache the rescaled image on the server. Example: the imageurl could look like background.jpg?size=100x100, where background.jpg actually redirects to a script page that generates or loads a previously generated image in the required size from cache.

Categories : HTML

Bat File: Start iexplore, get html when loaded
you can use wget for Windows: wget -O html.txt www.google.com Please note the uppercase letter O.

Categories : Internet Explorer

how to use local locate DB for emacs helm?
Try setting locate-make-command-line. (defun jpk/locate-make-command-line (str) (list locate-command "-d" "/path/to/update.db" str)) (setq locate-make-command-line 'jpk/locate-make-command-line)

Categories : Emacs

How to use selenium webdriver on local (on my pc) webpage instead of locate somwhere on www?
When you call the driver.get(URL) method, WebDriver looks for HTTP request using as base javascript, Therefore, refering to a website as a path, that task won't be possible. But it will be possible if you : 1st- Install Apache WebServer (let's say) on your marchine. 2nd- Upload or expose to the WebServer, that web application (dispatcher.html) 3rd- Try recording and executing your testcases on [http://localhost:8080/dispatcher.html] (8080 is the default port but you can configure it to other).

Categories : Java

Changing file loaded from internet to file loaded from internal memory
You can provide a locally stored file the same way. With Context.getDir() or Context.getFilesDir() you create the Fileobject where you get the URL with file.toURI().

Categories : Android

getJSON working in all browsers except local Firefox
One Firefox extension really helpful in this case is Firebug: http://getfirebug.com/. If you open Firebug and look in the Net tab, you can view the status of all HTTP requests on your page. The reason I suspected AdBlock is 2-fold. One, you mentioned the problem manifests only on Firefox and AdBlock is probably the most popular extension. Two, AdBlock blocks certain HTTP requests by filtering based on URLs, and I imagine something like Banner in the URL (i.e. banner ads) would get caught by the filter.

Categories : Jquery

UIWebView not loading local .html file
You are using a relative path (hence the blue color of a folder). You can actually find the answer to this problem here Load resources from relative path using local html in uiwebview or below: Drag the resource into your xcode project, you will get two options "create groups for any added folders" and "create folders references for any added folders". Select the "create folder references.." option. The code below should work. NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"/HTML"]]; [webView loadRequest:[NSURLRequest requestWithURL:url]];

Categories : IOS

file:/// for url path for local html files?
It is a standard URL code for a local file. Also Check out this:- the slash is a general, system-independent way of separating the parts, and in a particular host system it might be used as such in a pathname (as in Unix systems) or internally mapped to another character

Categories : HTML

Loading local .HTML-file with WebView
Change file:///assets/hello.html to file:///android_asset/hello.html. This assumes that your HTML file is located at assets/hello.html in your project. Also, move your <h1> element into the <body>, so that it will actually work.

Categories : Android

Read Local HTML File into String With VBA
This is one method Option Explicit Sub test() Dim oFSO As Object Dim oFS As Object, sText As String Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFS = oFSO.OpenTextFile("C:UsersosknowsDesktopimport-store.csv") Do Until oFS.AtEndOfStream ' sText = oFS.ReadLine 'read line by line sText = oFS.ReadAll() Debug.Print sText Loop End Sub EDIT: Try changing the following line to one of the following 3 lines and see if it makes any difference http://msdn.microsoft.com/en-us/library/aa265347(v=vs.60).aspx Set FS = FSO.OpenTextFile("C:UsersosknowsDesktopimport-store.csv", 1, 0) Set FS = FSO.OpenTextFile("C:UsersosknowsDesktopimport-store.csv", 1, 1) Set FS = FSO.OpenTextFile("C:UsersosknowsDesktopimport-store.csv", 1, 2) EDIT2: Does

Categories : HTML

How to call a web api via ajax over SSL from a local html file?
The preflight request is not allowed to include an entity body or credentials. If you are using preflighted requests then you cannot use two way SSL. The solution is to change the server to make the certificate optional. I've only done this using Apache HTTP server or Tomcat but I assume other servers are also capable of this. In apache the setting should be changed to SSLVerifyClient optional and in Tomcat the SSL settings should be changed to clientAuth="want" Without this change only CORS simple requests will work.

Categories : Javascript

Not able to locate element in Selenium
You can get the img tag by xpath, get src attribute value and then download it via urlretrieve: import urllib img = browser.find_element_by_xpath('//body/img') src = img.get_attribute("src") urllib.urlretrieve(src, "captcha.png")

Categories : Python

XMLHttpRequest cannot load local destop file in html
the security feature you encountered is supposed to prevent malicious scripts to read from the local file system. have you looked into the html5 file/filereader api? there is a tutorial with working demos. you may also have a look here.

Categories : Javascript

Save textarea to HTML file on local server
You can post the text to a php file. In the php file you set the following headers: header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=somename.html"); header("Content-Transfer-Encoding: binary"); header("Content-Type: application/force-download"); After that you simply output the html from the editor.

Categories : PHP

Cannot locate BeanDefinitionParser for element [resources]
Make sure that you have to correct jars on your classpath, make sure that spring-webmvc.jar is on the classpath. When using Maven (or Gradle) make sure that you have a single (and correct) version of that jar on your classpath. Multiple versions can conflict.

Categories : Spring

Locate an element and change the class
Try this: DEMO with both versions. $('#MainDiv').find('div.divPrintDetailed').removeClass('divPrintDetailed').addClass('divPrintSelected'); and change your html for the MainDiv so it has a ID: <div id="MainDiv" class ="MainDiv"> You can also use toggleClasse() like: $('#MainDiv').find('div.divPrintDetailed,div.divPrintSelected').toggleClass('divPrintDetailed divPrintSelected');

Categories : Jquery

Unable to locate element with cssSelector
You should try the answer on this page How can I find an element by CSS class with XPath?. You should be able to do something close to your first answer by searching only for "marker-cluster-small." Hope it helps in some way. So it would be ("//div[contains(@class, 'marker-cluster-small')]")

Categories : CSS

Need help to locate the text of element with class?
Parsing HTML with regular expressions is a bad idea, because HTML is not a regular language. Ideally, you want to parse the DOM / XML to a tree structure. http://nokogiri.org/ is pretty popular.

Categories : Ruby

IE11 unable to connect to local IIS, other browsers work fine
Internet Explorer 11 includes a new isolation technology called AppContainer which is used by the Enhanced Protected Mode feature of the browser. EPM/AppContainer network restrictions help mitigate attacks against the computer by preventing content in the Internet Zone from connecting to your local network or your local PC. The problem you're encountering occurs when the zone settings are such that your Local PC's content is treated as Internet Zone. If you were to use the machine name (e.g. http://mypc or http://localhost) the content would load in the Intranet Zone and thus outside of Protected Mode and thus outside of the AppContainer. The same feature prevents IE11 from using Fiddler in your scenario; you can learn more about this issue here: http://fiddler2.com/blog/blog/2013/08/02/

Categories : Internet Explorer

UIWebView local Resource main bundle html file
Instead of loading the HTML directly with loadHTMLString, you can have the web view do the work of loading the HTML from the bundled file. That way it should know where the HTML came from to resolve relative links. Ex: NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]]; [webview loadRequest:[NSURLRequest requestWithURL:url]]; I haven't tested the above, you may need the inDirectory clause of the pathForResource method. Good luck!

Categories : Objective C

Loading local html file in Android browser through intents
First, get rid of the setComponent() call. Treat your users with respect, and allow them to use whatever browser they wish. Besides, Chrome is only on a small percentage of Android devices, meaning that your app will crash on most devices. Second, get rid of the addCategory() call, and replace your Intent action with Intent.ACTION_VIEW. All of that should be done regardless of where you are getting your Web content from, as your current approach is incorrect and unreliable. With respect to assets, other apps cannot directly read your assets via a Uri. You can create a ContentProvider that serves your assets, but Chrome does not support the content:// Uri scheme. In fact, Chrome only supports http:// and https:// Uri values for loading arbitrary URLs -- it does not even seem to support f

Categories : Javascript

Unable to locate the element while using selenium-webdriver
Most of the times im using By.xpath and it works specially if you use contains in your xpath. For example : //*[contains(text(),'ABC')] This will look for all the elements that contains string 'ABC' In your case you can replace ABC with Delete Log File

Categories : Python

Unable to grab the element which is loaded using Load() method from parent Element
Try binding your click event in the complete handler, like so: $('#productsContainer').load('productsThumbs.aspx', function() { $('#productsContainer .productthumbs').click(function () {alert('Click');} ); }); edit: requested explanation The load() call is "asynchronous", meaning that while it does its work, your code will continue. This means the operation may not be complete when you try to manipulate the data it returns. The function we have added is a "callback", which will run when the load operation completes. If you perform your manipulation here, you can be sure that the elements you are working on exist ( assuming the load was successful ) It is similar to the callbacks you might have used in jQuery animation.

Categories : Jquery

uiwebView local file html animation problems when I change viewcontroller
Maybe some timers get into each other's way if you reload, i.e. re-schedule another timer. It does not make sense for the timer to fire every 1/2 seconds although the loading has finished. To solve this with timers, you should invalidate the timer when the loading property becomes false. Make sure you keep a reference to the timer. if (!_problemaWV.loading) { [_activityIndicator stopAnimating]; [_timer invalidate]; _timer = nil; } Sure, I think the design pattern of having a timer check every 1/2 second if it needs to update a UI element is not very good practice. Rather, you should use the UIWebView's delegate methods to inform your UI that the loading is complete.

Categories : IOS

Unable to locate element: {"method":"id","selector":"sysPublishDateDate"}
Try this WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("sysPublishDateDate"))); OR wait.until(ExpectedConditions.elementToBeClickable(By.id("sysPublishDateDate"))); and then use WebElement dateselection = driver.findElement(By.id("sysPublishDateDate")); dateselection.clear(); dateselection.sendKeys("8/7/2013",Keys.ENTER);

Categories : Java

Using a CSS Selector to locate some data stored in a javascript element
Try HTML::Query use HTML::Query (); # get raw (unparsed) content of page into $content. # eg: $mech->content or similar my $content = qq| <html> <head> <script type="text/javascript"> function init() { var x = [1,2,3,4,5,6,7]; alert(x); } </script> </head> <body onload="init()"> </body> </html> |; # This is a CSS selector ----------------------vvvvv my ($e) = HTML::Query::Query(text => $content, 'script'); die "couldn't find script element! " unless defined $e; # can't use as_text or as_trimmed_text from HTML::Element print $e->as_XML." ";

Categories : Javascript

selenium webdriver unable to locate element hidden in div
Try use WebDriverWait, it makes no sense talking about visibility now, because the exception is NoSuchElementException, which means the element is not there. After resolve this exception, then we can move through talking about visibility. driver.switchTo().frame(0); // use this if it's in frame and you don't know how to locate it WebElement input = (new WebDriverWait(driver, 15)).until(ExpectedConditions.presenceOfElementLocated(By.id("qt_invoices_text1"))); Also just a heads up, don't use Thread.Sleep(), use WebDriverWait please.

Categories : Java

Selenium webdriver can't locate element (it's not hidden, it's not within subframe)
Try the below: browser.find_element_by_xpath("//a[@class='applyCustomFilter' and text() = 'Refine Search']").click() XPATH Tester

Categories : Python

Is there a CSS selector to locate nth element of a given type in the entire page?
Simply change the target to point to your new <div> elements instead: div:nth-of-type(1) h2 { ... } div:nth-of-type(2) h2 { ... } This obviously depends on how many divider elements are on your page. If you are using dividers not just to contain <h2> elements you could always give them a new class: <div class="h2-container"> <h2>Hello, world!</h2> </div> div.h2-container:nth-of-type(1) h2 { ... } div.h2-container:nth-of-type(2) h2 { ... } This does assume that all your divider elements are under the same parent, however.

Categories : CSS

Image Upload hanging on mobile browsers but not on local computer - Node JS, Express
The trouble lies in the middle ware of your express app. You have used : server.use(express.bodyParser()); Which tells Express to handle JSON, URLEncoded and multipart requests. However, there seems to be a node Formidable module to handle multipart requests also. The solution is to either use only URLEncoded and handle the upload in formidable, or not use formidable and handle everything in bodyparser. So your code should now look like: a)Formidable upload: server.use(express.urlencoded()); //server.use(express.methodOverride()); //server.use(express.bodyParser()); or b)Express Multipart upload: //server.use(express.urlencoded()); //server.use(express.methodOverride()); server.use(express.bodyParser()); There is a reference to node_modules/formidable/lib/incoming_form.js:107:

Categories : Node Js

locate strong html (alone) inside div
you tried the right way (except a copy paste mistake - missing '') $('.test').find('strong').html() Demo: Fiddle

Categories : Jquery

Embedding YouTube Videos doesn't work in local HTML files (using file:// URL)
Because you use the // at the beginning of the url, meaning you inherit the currently used protocol. At your host it is http:// (good), but at your C drive it's file:// (bad). So just use http:// instead of //: <object width="560" height="315"> <!-- See: value="http://.. --> <param name="movie" value="http://www.youtube.com/v/0l-7IGRsORI?hl=en_US&amp;version=3"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <!-- See: src="http://.. --> <embed src="http://www.youtube.com/v/0l-7IGRsORI?hl=en_US&amp;version=3" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed

Categories : HTML

Trying to load local JSON file to show data in a html page using JQuery
As the jQuery API says: "Load JSON-encoded data from the server using a GET HTTP request." http://api.jquery.com/jQuery.getJSON/ So you cannot load a local file with that function. But as you browse the web then you will see that loading a file from filesystem is really difficult in javascript as the following thread says: Local file access with javascript

Categories : Javascript

process html form submission with ruby to modify local file on server
You need some way to invoke the Ruby file as a result of the web request, and to pass in all form data to the script. It looks like you can do that with Apache by treating Ruby scripts as CGI. Quoting: DocumentRoot /home/ceriak/ruby <Directory /home/ceriak/ruby> Options +ExecCGI AddHandler cgi-script .rb </Directory> At this point you can use the CGI library that ships with Ruby to handle the parameters: #!/usr/bin/ruby -w # Get the form data require 'cgi' cgi = CGI.new form_text = cgi['text'] # Append to the file path = "/var/tmp/some.txt" File.open(path,"a"){ |file| file.puts(form_text) } # Send the HTML response puts cgi.header # content type 'text/h

Categories : HTML

Unable to locate element (username and password) in selenium webdriver
To be Handy on Locators, their types and how to pick same locator in different ways, you should use initially Selenium Builder or Selenium IDE (firefox Addon) record the event you want, change the locator using available ways under target dropdown. This will help you to find the exact locator. I hope by this way, you can figure out what you are missing.

Categories : Java

Chrome Extension: content script is unable to load local HTML file into iframe
You need to set the file in the web_accessible_resources and it is case sensitive.

Categories : Javascript

How to avoid click on lower html element when clicking on the html element above it on touch devices?
you should use event.stoppropagation(): $('your-element').on('click', function(e){ e.stopPropagation(); // other stuff here }) That should solve your problem.

Categories : Android



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