Mobile devices such as the iPad, iPhone or Android tablets are pretty on par with modern desktop browsers when it comes to rendering JavaScript, though that's not to say they do so without hiccups. One of the more crippling limitations is mobile devices' lack of support for the onmouseover/out events of JavaScript, which if you think about is more of a fundamental "shortcoming" of touch based devices in general rather than a deliberate act of omission. Regardless, this lack of support ...
Updated 07-18-2011 at 06:35 AM by ddadmin
It's not directly obvious from this how we can: - start a movie on page load (question asked by some people on different forums); - specify the dimensions and position of the movies in percentages; - make good use of the ytplayer functions. Autoplay: something like Code: function so_start() { loadNewVideo('lKq9_kk3Zbc', 20); } //IE needs some time window.onload=setTimeout('so_start()',2000) Size of movie in percentages ...
function so_start() { loadNewVideo('lKq9_kk3Zbc', 20); } //IE needs some time window.onload=setTimeout('so_start()',2000)
Updated 08-29-2009 at 01:59 PM by molendijk
A growing number of scripts here on DD utilize the popular jQuery JavaScript library as its backbone, which means at the top of these scripts you'll see a reference such as: Code: <script type="text/javascript" src="jquery-1.2.6.pack.js"></script> which obviously requires you to download and host "jquery-1.2.6.pack.js" locally on your server. For those of you who likes to minimize hosting your own files for whatever reason, Google ...
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
Original Script: DHTML Window By default the DHTML Window script can only be minimized by clicking on the "minimize" icon located on the upper right of the opened window. Someone asked on the forums if there's a way to do this dynamically, such as via a link instead. Well, certainly. Given the below example DHTML Window: Code: var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", ...
var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site",
If we want the select box to function as a genuine menu, then a click on a given option (of the select box) must give us the same range of possibilities as does a click on the items of a normal menu. So a click should allow us to go to a new page, to open a popup window, to produce an alert etc. We can achieve this with the help of a function that has the following general form: Code: var which=""; function DoSomethingWithOptionvalue(which) { var optionValue = document.getElementById(which).options[document.getElementById(which).selectedIndex].value; ...
var which=""; function DoSomethingWithOptionvalue(which) { var optionValue = document.getElementById(which).options[document.getElementById(which).selectedIndex].value;
Updated 08-12-2009 at 12:20 AM by molendijk