Categories
Tech Tips Web

IE7 Tip – Reload

IE7 Tip - ReloadWhen IE7 was designed they took the peculiar decision to split the navigation buttons into three places (if you include the home button).

If you find yourself up in the top left wanting to reload, just click the drop-down button and select the current page (will be highlighted and have a tick-mark on the left), as shown in the picture.

Bizarrely and unfortunately, this only works if you’re not looking at the last page in your navigation history for this tab. This suggests that it’s only through poor programming logic that it works at all.

[tags]IE,IE7,Microsoft,tip,tips,browser,flaw,bug[/tags]

Categories
Tech Tips Web

Firefox Tip

I discovered yesterday that [tag]bookmarks[/tag] in [tag]Firefox[/tag] can have no name.

Seems pointless? Not if the sites have [tag]favicons[/tag]:

Firefox Bookmark Favicons

Space saving, so you can see more, hence fewer clicks.

The above are jazzle.co.uk, The Sketchup Components Collection, bit-tech, ebay, amazon, radiotimes.com and the default icon (for a site with no [tag]favicon[/tag]), but you knew that of course since you recognise the sites’ icons.

Categories
Code

JS: Clear Default Value onFocus

Simply add the following to the the onFocus attribute of any HTML form input tag.
[code lang=”JavaScript”]if (this.value == this.defaultValue) this.value = ”;[/code]
this.defaultValue is automatically given the value in the HTML.

Categories
Code

Append to Body onLoad

I looked for a long time how I could add JavaScript functions to an HTML document’s onLoad attribute.

Eventually I found this, something so obvious that I had considered trying it but foolishly didn’t try.

[code lang=”JavaScript”]
var oldLoad = window.onload;
window.onload = function() {
oldLoad();
function2();
}
[/code]

Categories
Code

jsReq

I wanted to tell the user that they need JavaScript, but obviously only if they don’t already have it enabled.
The following is a very crude script which uses the very fact that JS is available to hide the requirement notice…

HTML:
[code lang=”html”]

Warning!
You need to have javascript enabled to use this page.

[/code]

JS:
[code lang=”JavaScript”]
function removeElementById(eleId) {
eleId = document.getElementById(eleId);
if (eleId.parentNode && eleId.parentNode.removeChild) {
eleId.parentNode.removeChild(eleId);
}
}
removeElementById(“jsRequiredDiv”);
[/code]