Presmurdu - Pakistani Urdu Forum | urdu shayari | Urdu Islam | Design Urdu PoetryLog in


descriptiondefaultAnimated Random Option Combo Javascripts

This is a unique combo menu script that lets the user make a URL selection in two ways:

By directly selecting the option you wish to go to, or
Let the script randomly decide for you, by cycling through all available options and picking one randomly.

Step 1: Insert the below into the <HEAD> section of your page:


<script type="text/javascript">

* Animated Random Option Combo- by (
* This notice must stay intact for usage
* Visit Presmurdu for this script and 100s more

var animatedList={


 //calculate number of frames to animate (cycle through options before settling on one)

   if (this.curframe<this.maxframes)
      this.selectObj.selectedIndex=this.settledIndex=(this.curframe<this.optionscount)? this.curframe : this.curframe-this.optionscount
   else{ //settle on and select this option
      this.selectObj.selectedIndex=(this.selectObj.selectedIndex==-1)? this.settledIndex : -1
   if (this.curframe<this.maxframes+4) //Keep running this function until "maxframes" cycle plus 4 (4 being cycle for highlighting selected option)
      setTimeout("animatedList.randomize()", 100)



Step 2: Insert the below two sample combo boxes the <body> section of your page:


<select id="webdevlinks" size="6" onChange="animatedList.navigate('webdevlinks')">
<option value="">Presmurdu Pakistani Forum</option>
<option value="">JavaScript Reference</option>
<option value="">DOM Reference</option>
<option value=""></option>
<option value="">CSS Drive</option>
<option value="">Dynamic Drive</option>
</select><br />
<input type="button" onClick="animatedList.randomizeInit('webdevlinks')" value="Random Link!" />

<select id="newslinks" size="1" onChange="animatedList.navigate('newslinks')">
<option value="">CNN</option>
<option value="">MSNBC</option>
<option value="">BBC News</option>
<option value="">Yahoo News</option>
</select> <input type="button" onClick="animatedList.navigate('newslinks')" value="Go" /> <input type="button" onClick="animatedList.randomizeInit('newslinks')" value="Random" />

Love You Presmurdu

Happiness is a perfume.
You cannot spread on others without getting a few drops on urself.
So always be happy to make others happy !

descriptiondefaultRe: Animated Random Option Combo Javascripts

v nice sharing keep it up


Nothing is good or bad,but thinking makes it so....

Permissions in this forum:
You cannot reply to topics in this forum