« Earlier 2 items total Later »

On this page: 

clear default text onClick - restore if nothing entered

From ScriptyGoddess:
http://www.scriptygoddess.com/archives/2005/11/15/clear-default-text-onclick-restore-if-nothing-entered/

In your document's head:
<script type="text/javascript">
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}
</script>


The actual form field:
<input type="text" name="myfield" onclick="clickclear(this, 'default text')" onblur="clickrecall(this,'default text')" />

Back and Forward Links in History

Using form buttons:

<form>
<input type="button" value="Back" onclick="history.back()">
<input type="button" value="Forward" onclick="history.forward()">
<input type="button" value="Reload" onclick="location.reload()">
</form>


Using a normal link:

<a href="javascript:history.back();">Back</a>


« Earlier 2 items total Later »