a pastebin project

Someone

  1. kod php/html;
  2.  
  3. <input id="<?=$prefix?>" style="text-align:center" size="1" type="text" name="<?=$id?>[prefix]" onkeyup="UCF(this);" value="<?=$prefix?>">
  4.  
  5.   <script language="javascript">
  6.         <!--
  7.         var prefix_array=new Array(<?foreach ($prefix_array as $v) echo $v.", ";?>0);
  8.  
  9.         function UCF(AField)
  10.         {
  11.                 var check=1;
  12.  
  13.                 if (AField.id!=AField.value)
  14.                 {
  15.                         if (AField.value=="") check=-1; else check=AField.value;
  16.                         if (prefix_array.in_array(check)) AField.style.color="red";
  17.                         else AField.style.color="black";
  18.                 }
  19.  
  20.         }
  21.  
  22.  
  23.  
  24.         Array.prototype.in_array = function(p_val)
  25.         {
  26.                 for(var i = 0, l = this.length; i < l; i++) {
  27.                         if(this[i] == p_val) {
  28.                         return i;
  29.                 }
  30.         }
  31.                 return false;
  32.         }

advertising

Create a Paste

Please enter your new post below (or upload a file instead):





Please note that information posted here will not expire by default. If you want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords.

worth-right