href=”tel:” and mobile numbers

When dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number. For example, in Australia one would dial: 0 – trunk prefix 2 – Area code for New South Wales 6555 – STD code for a specific telephone exchange 1234 – … Read more

html links not working (using base href)

You have to quote attribute values with ” (QUOTATION MARK) or ‘ (APOSTROPHE), not “ (LEFT DOUBLE QUOTATION MARK) and ” (RIGHT DOUBLE QUOTATION MARK). This type of error is typically caused by writing code using a word processor (such as Microsoft Word or Apple Pages) with automatic replacement of quotes with typographic quotes (aka … Read more

how to exchange variables between two HTML pages?

In example1.html: <a href=”″>a link</a> <a href=”example2.html?myVar1=43″>another link</a> or generate the links with Javascript as desired. Just make sure the ?varName=value gets onto the end of example2.html somehow. Then, in example2.html, you use Javascript to parse the query string that example2 came with. To do this, you could try Querystring. // Adapted from examples on … Read more

Wrong extraction of .attr(“href”) in IE7 vs all other browsers?

It’s certainly not a bug in jQuery but instead browsers’ inconsistent implementations of .getAttribute(‘href’) – I suggest using just .get(0).href for consistency. Seems like you can access the attribute text in IE and Mozilla using .get(0).getAttribute(‘href’, 2) if you don’t want the absolute URI. Note however this won’t work in Opera and I haven’t tested … Read more

AngularJS All slashes in URL changed to %2F

%2F is the percent-encoding for the forward-slash / character. This problem is related to the fact that AngularJS 1.6 has changed the default for hash-bang urls in the $location service. To revert to the previous behavior: appModule.config([‘$locationProvider’, function($locationProvider) { $locationProvider.hashPrefix(”); }]); For more information, see SO: angularjs 1.6.0 (latest now) routes not working.

How can I get href links from HTML using Python?

Try with Beautifulsoup: from BeautifulSoup import BeautifulSoup import urllib2 import re html_page = urllib2.urlopen(“”) soup = BeautifulSoup(html_page) for link in soup.findAll(‘a’): print link.get(‘href’) In case you just want links starting with http://, you should use: soup.findAll(‘a’, attrs={‘href’: re.compile(“^http://”)}) In Python 3 with BS4 it should be: from bs4 import BeautifulSoup import urllib.request html_page = urllib.request.urlopen(“”) … Read more

Including both href and onclick to HTML tag

You already have what you need, with a minor syntax change: <a href=”” onclick=”return theFunction();”>Item</a> <script type=”text/javascript”> function theFunction () { // return true or false, depending on whether you want to allow the `href` property to follow through or not } </script> The default behavior of the <a> tag’s onclick and href properties is … Read more