| 249 | | function checkUnique(path,thevalue,thename,thetable,thefield,excludeid){ |
| 250 | | |
| 251 | | var theurl=path+"checkunique.php?value="+encodeURIComponent(thevalue); |
| 252 | | theurl=theurl+"&table="+encodeURIComponent(thetable); |
| 253 | | theurl=theurl+"&name="+encodeURIComponent(thename); |
| 254 | | theurl=theurl+"&field="+encodeURIComponent(thefield); |
| 255 | | theurl=theurl+"&excludeid="+parseInt(excludeid); |
| 256 | | |
| 257 | | loadXMLDoc(theurl,processUniqueReqChange,true); |
| 258 | | } |
| | 249 | function checkUnique(tabledefid,column,checkvalue,excludeid){ |
| | 250 | |
| | 251 | var theurl=APP_PATH+"checkunique.php?tdid="+parseInt(tabledefid); |
| | 252 | theurl=theurl+"&c="+encodeURIComponent(column); |
| | 253 | theurl=theurl+"&val="+encodeURIComponent(checkvalue); |
| | 254 | theurl=theurl+"&xid="+parseInt(excludeid); |
| | 255 | |
| | 256 | |
| | 257 | loadXMLDoc(theurl,null,false); |
| | 258 | |
| | 259 | response = req.responseXML.documentElement; |
| | 260 | thevalue = response.getElementsByTagName('isunique')[0].firstChild.data; |
| | 261 | |
| | 262 | if(thevalue==1) return true; else return false; |
| | 263 | } |