Changeset 720 for trunk/phpbms/common
- Timestamp:
- 01/06/10 17:04:26 (2 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/common/javascript/fields.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/common/javascript/fields.js
r703 r720 237 237 } 238 238 239 function checkUnique(tabledef id,column,checkvalue,excludeid){240 241 var theurl= APP_PATH+"checkunique.php?tdid="+parseInt(tabledefid);242 theurl=theurl+"&c="+encodeURIComponent(column); 243 theurl=theurl+"& val="+encodeURIComponent(checkvalue);244 theurl=theurl+"& xid="+parseInt(excludeid);245 239 function checkUnique(tabledefuuid , columnName, value, excludeuuid){ 240 241 var theurl= APP_PATH + "checkunique.php?tduuid=" + encodeURIComponent(tabledefuuid); 242 243 theurl=theurl+"&cname="+encodeURIComponent(columnName); 244 theurl=theurl+"&value="+encodeURIComponent(value); 245 theurl=theurl+"&xuuid="+encodeURIComponent(excludeuuid); 246 246 247 247 loadXMLDoc(theurl,null,false); 248 248 249 response = req.responseXML.documentElement; 250 thevalue = response.getElementsByTagName('isunique')[0].firstChild.data; 251 252 if(thevalue==1) return true; else return false; 253 } 249 var isUnique = false; 250 251 try { 252 253 isUnique = eval("(" + req.responseText + ")") 254 255 } catch(err) { 256 257 isUnique = false; 258 259 } 260 261 return isUnique; 262 263 }