alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

jforum example source code file (permission_control.js)

This example jforum source code file (permission_control.js) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jforum tags/keywords

The jforum permission_control.js source code

function checkThisField(fieldName)
{
	if (fieldName.options[0].selected) {
		for (i = 1; i < fieldName.length; i++) {
			fieldName.options[i].selected = false;
		}
	}
	else {
		fieldName.options[0].selected = false;
	}

	if (fieldName.selectedIndex == -1) {
		fieldName.options[0].selected = true;
	}
}

function validateSelectFields()
{
	form = document.form1;
	
	for (i = 0; i < form.length; i++) {
		if ((form.elements[i].type == "select-multiple") && (form.elements[i].selectedIndex == -1)) {
			form.elements[i].options[0].selected = true;
		}
	}

	return false;
}

Other jforum examples (source code examples)

Here is a short list of links related to this jforum permission_control.js source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.