MattsBits
MattsBits - Brunel District

MattsBits

MattsBits RSS Feed - Subscribe Now!

A collection of techniques, code snippets and information relating to PLSQL, Javascript and APEX

RSS Feed for JavaScript category

Category : JavaScript

Categories : | JavaScript | Views : 278 | Email Link
The following JavaScript function allows you to set the visibility of an HTML element to be visible or invisible. It also allow you to toggle the current visibility.

This function is a useful way of showing and hiding html items including divs and images.

Technorati Tags : | javascript |

Categories : | JavaScript | Views : 252 | Email Link
The following JavaScript function allows you to set the visibility of an HTML element to be visible or invisible. It also allow you to toggle the current visibility.

This function is a useful way of showing and hiding html items including divs and images.

Technorati Tags : | javascript |

Categories : | JavaScript | Views : 424 | Email Link
The following article explains how to create sets of Yes No checkboxes that are mutually exclusive. That is when you check the Yes box the corresponding No box is unchecked.

Technorati Tags : | javascript |

Categories : | JavaScript | Views : 569 | Email Link
Sometimes you want to check, uncheck or toggle a number of checkboxes using either buttons or text links.

If your text boxes have a name attribute the function below can be used to either select all, select none or toggle the existing setting.

Technorati Tags : | javascript |

Categories : | JavaScript | Views : 220 | Email Link
Sometimes it is useful to obtain the dimensions of the users browser window. The following JavaScript code can be used to obtain the height and width :

Technorati Tags : | javascript |

Categories : | JavaScript | Views : 268 | Email Link
Using this Javascript function you can toggle the visibility of HTML items by their ID.

Include the following in the <head> of your web page :

<script type="text/javascript">
<!--
function toggleID(id) {

  if (document.getElementById(id).style.display=='none') {
    document.getElementById(id).style.display='block';
  } else {
    document.getElementById(id).style.display='none';
  }  
}
// -->
</script>

Technorati Tags : | javascript |

Categories : | JavaScript | Views : 241 | Email Link
In order to replicate the forward and back button functionality you can use the following Javascript functions :

<script type="text/javascript">
<!--
function goBack() {
  history.go(-1);
}
function goForward() {
  history.go(1);
}
//-->
</script>


These can be used as required or you can create some HTML links :

<a href="javascript:history.go(-1);">Go back</a>
<a href="javascript:history.go(1);">Go Forward</a>


or some HTML buttons :

<form>
<input value="Back" onclick="history.go(-1); return true;" type="button">
<input value="Forward" onclick="history.go(1); return true;" type="button">
</form>

Technorati Tags : | javascript |


No Previous Records No More Records


 
 
 
PHP Powered  MySQL Powered  Valid XHTML 1.0  Valid CSS  Firefox - Take Back The Web  EUKHost - Recommended Webhosting Solutions

MattHawkins CMS v2.0 - Copyright 2009-2010