Archive for the ‘JavaScript’ Category
Reduce the file size of JavaScript
Thursday, March 6th, 2008A little basic but useful referance - Print page javascript
Monday, February 18th, 2008Snow on a website?
Thursday, December 13th, 2007Just do as the client wants!
This looked like the best example I could find in 5 mins:
Searchable Google Map
Thursday, October 25th, 2007Another Light box - thick box
Thursday, August 16th, 2007This looks nice for inline forms - yet another lightbox idea
Wednesday, July 25th, 2007Useful JavaScript tit bits - Googlie Spell and Enhanced lightbox
Wednesday, July 25th, 2007Adding a link using JavaScript
Tuesday, July 24th, 2007function addLink() {
var closeP = document.createElement("p");
closeP.appendChild(document.createTextNode("Alternatively, ");
var closeLink = document.createElement("a");
closeLink.href = "#";
closeLink.onclick = function() { window.close(); };
closeLink.appendChild(document.createTextNode("Close window"));
closeP.appendChild(closeLink);
var parentEl = document.getElementById("container"); // this should be the ID of the element this link should be appended to
parentEl.appendChild(closeP);
}
if (window.addEventListener) { window.addEventListener("load", addLink, false); }
else if (window.attachEvent) { window.attachEvent("onload", addLink); }