Shadow-Here


Server : Apache
System : Linux methusalix2 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
User : hios ( 1437)
PHP Version : 5.6.40-0+deb8u12
Disable Function : proc_close,proc_open,dl,shell_exec,passthru
Directory :  /home/staff/typo3/typo3_src-6.1-current/t3lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :
Current File : /home/staff/typo3/typo3_src-6.1-current/t3lib/jsfunc.updateform.js
/***************************************************************
*
*  Universal formupdate-function
*
*
*
*  Copyright notice
*
*  (c) 1998-2011 Kasper Skaarhoj
*  All rights reserved
*
*  This script is part of the TYPO3 t3lib/ library provided by
*  Kasper Skaarhoj <kasper@typo3.com> together with TYPO3
*
*  Released under GNU/GPL (see license file in tslib/)
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*  This copyright notice MUST APPEAR in all copies of this script
***************************************************************/


function updateForm(formname,fieldname,value) {
	if (document[formname] && document[formname][fieldname]) {
		var fObj = document[formname][fieldname];
		var type=fObj.type;
		if (!fObj.type) {
			type="radio";
		}
		switch(type) {
			case "text":
			case "textarea":
			case "hidden":
			case "password":
				fObj.value = value;
			break;
			case "checkbox":
				fObj.checked = ((value && value!=0) ? "on":"");
			break;
			case "select-one":
				var l=fObj.length;
				for (a=0;a<l;a++) {
					if (fObj.options[a].value == value) {
						fObj.selectedIndex = a;
					}
				}
			break;
			case "select-multiple":
				var l=fObj.length;
				for (a=0;a<l;a++) {
					if (fObj.options[a].value == value) {
						fObj.options[a].selected = 1;
					}
				}
			break;
			case "radio":
				var l=fObj.length;
				for (a=0; a<l;a++) {
					if (fObj[a].value==value) {
						fObj[a].checked = 1;
					}
				}
			break;
			default:
		}
	}
}

Samx