I wanted to post the news some time ago, but I was afraid I was wrong. So I waited. It seems, however, to be the truth and nothing but the truth (for the time being): YouTube have removed their ads from all videos except the ones that have http://www.youtube.com/watch?v=ID. (And even there, the ads are gone when we use IE or Firefox). So now we can embed YouTube videos - in an iframe or flash object - without resorting to all kinds of malicious means to remove the ads (which does ...
Updated 07-04-2012 at 10:47 PM by molendijk (Correction)
I was browsing the internet and came across this tecnique and thought it was rather cool. To make plain text show in a password field, you need the following form - HTML Code: <form> <input type="text" name="passwordPlain" id="passwordPlain" value="Password" onfocus="swapPasswordBoxes('click')" style="display:none;"/> <input type="password" name="password" id="password" ...
<form> <input type="text" name="passwordPlain" id="passwordPlain" value="Password" onfocus="swapPasswordBoxes('click')" style="display:none;"/> <input type="password" name="password" id="password"
Updated 06-08-2012 at 10:23 PM by keyboard (swapped onclick for onfocus)
There's an increasing number of sites that refuse to be opened in a new window. For instance, the following doesn't work (anymore): Code: <a href="javascript: void(0)" onclick="window.open('http://google.com'">open Google in new (traditional) window</a> In those cases, you can use the following to open the sites in a new tab: Code: <a href="javascript: void(0)" onclick="window.open('','_new').location.href='http://google.com'">open ...
<a href="javascript: void(0)" onclick="window.open('http://google.com'">open Google in new (traditional) window</a>
<a href="javascript: void(0)" onclick="window.open('','_new').location.href='http://google.com'">open
In javascript there are basically two types of events that can be assigned to elements and objects. I classify them as version 4 events (those that were available in Netscape 4 and IE 4), and version 5 events, those that became available starting with IE 5 and presumably NS 5, but the earliest I'm aware of them in NS was NS 6 (I don't recall ever seeing a NS 5 browser). Version 4 events are still available in today's browsers and are usually the first ones folks learn about, examples: ...
Updated 04-05-2012 at 05:26 AM by jscheuer1 (add info)
I'm amazed at how many people don't use a very simple shortcut for document.getElementById. This is for all the people who don't use a javascript library like jQuery. All you have to do is include this code somewhere on your page Code: function $(element) { return document.getElementById(element); } Then when you want to use document.getElementById('id'); just type $('id'); instead. Example Code: <html> ...
function $(element) { return document.getElementById(element); }
document.getElementById('id');
<html>