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 : 122 | Email Link
This article will explain how to add a text counter to a standard HTML textarea element.

This allows you to display remaining characters to your users as they type inside the text area. This technique can also be used with HTML text boxes.

When the character count reaches 0 the text turns red.

Technorati Tags : | javascript | html | text counter | textarea | input |

Categories : | JavaScript | Views : 83 | Email Link
Sometimes you need to remove options from an HTML select list using Javascript. The following function can be called to remove options from a select list given the value of the relevant option.

The function requires two parameters. The first is the value of the option to remove and the second is the select list reference.

Technorati Tags : | javascript | select list | options | remove | delete |

Categories : | JavaScript | Views : 370 | 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 : 334 | 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 : 563 | 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 : 759 | 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 : 310 | 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 : 354 | 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 |


No Previous Records Next 8 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