H I O X INDIA
FREE Javascript
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Java Script Source
List All
Date & Time
Calendar
Stop Watch script
Slide Show
Image Effect
Mouse Effects
Color Picker Tool
Dynamic Color
Random Generator
Select All
Form Validation
Textbox Counter
Dynamic Form select
Bookmark
Window / User Info
Security / Authenticate
Status Bar
Title Bar
Cursor Position
Country List
Calculators
Delete Repeated Values
Alphanumeric
Free Games





Delete repeated values and get sorted list of values


About
The free javascript function can be used to get sorted list after deleting repeated value of string or integers


Features
a)Give any repeated values in the textarea as string or integer
b)Just click the Remove Duplicates button
c)You can have sorted list of strings or numbers without repeated values
d)Click reset and check it again with any duplicate values


Preview
Deleting Duplicate values in an array:



Code
<!--        Script by hscripts.com          -->
<!--        copyright of HIOX INDIA         -->
<!-- Free javascripts @ http://www.hscripts.com -->
<script language=javascript>
function delrepeat(mytextarea)
{
   var temp=document.txtchk.mytextarea.value;
   var array2 = temp.split(" ") ;
   var array1= new Array;
   for(var i = 0; i < array2.length; i++) 
   {
       var xx = true;
       var ArrayVal = array2[i];
       for(var j = i+1; j < array2.length; j++)
       {
         if(array2[j] == ArrayVal) 
          xx = false;
       }
       
	if(xx == true)
            array1.push(ArrayVal)
   }
 document.txtchk.mytextarea.value=array1;
}
</script>
<!-- Script by hscripts.com -->
Release Date - 20.6.2007

Get free version without ©copyright link for just 5



Usage
a)Create a form with name "txtchk" and place a textbox & call it by name "mytextarea"
Ex:-
<form name ="txtchk">
<input type="text" name="mytextarea" size="30" value="1 2 2 3 3 4 4 5 5 5"></form>


b)Create a button with name and call the function delrepeat(mytextarea)by using onclick event.
Ex-
<input type="button" value="Remove Duplicates" onclick="delrepeat(mytextarea)" >

c)Now just copy the above free javascript code in your web page inside the head tag.





License
- This javascript (misspelled as java script)/HTML code is given under GPL License
- i.e. Free use for those who use it as it is.
- Free, if your modification does not remove our copyright information and links.
- Detailed License information can be found here
- You can purchase the script if your requirements does not meet GPL License terms.


privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Others