Presmurdu - Pakistani Urdu Forum | urdu shayari | Urdu Islam | Design Urdu Poetry
mhotram guest ager ap k member hain tu yahan sa login hun....
ager ap member nahi hain tu yahan sa ap humara es forum ma Register ho sakta hain.......

Go down
User Title
Posts Posts : 230
Rep Points Rep Points : 254
Thanks Thanks : 0
Age Age : 37
150 / 999150 / 999
0 / 1500 / 150
Gender : Male
View user profile

default Animated Random Option Combo Javascripts

on Sun Oct 23, 2011 4:35 pm
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 !

Posts Posts : 8631
Rep Points Rep Points : 8683
Thanks Thanks : 34
350 / 999350 / 999
0 / 1500 / 150
Awards Showcase Awards Showcase :
View user profile

default Re: Animated Random Option Combo Javascripts

on Mon Oct 24, 2011 5:25 pm
v nice sharing keep it up


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

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