Hi
I found this script and would like to use it twice on the same page. meaning two instances of it.
one on the left where it is now, and the other on the right...
ie two FLOATING MENUS
Can anyone please help. The site is
<span id="staticcombo" style="position:absolute;left:0;top:0;visibility:hidden">
<form name="jumpy">
<p><select name="example" size="1" onChange="gone()">
<option value="http://www.codearena.com">CodeArena.com</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.geocities.com">Geocities</option>
<option value="http://www.cnn.com">CNN</option>
</select>
<script language="javascript">
<!--
/*Always-visible combo box credit:
JavaScript Kit (www.javascriptkit.com)
Over 400+ free JavaScripts here!
*/
function gone()
{
location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
}
//-->
</script>
<input type="button" name="test" value="Go!"
onClick="gone()">
</p>
</form>
</span>
<script language="JavaScript1.2">
var combowidth=''
var comboheight=''
function initialize(){
if (document.all){
combowidth=staticcombo.offsetWidth
comboheight=staticcombo.offsetHeight
setInterval("staticit_ie()",50)
staticcombo.style.visibility="visible"
}
else if (document.layers){
combowidth=document.staticcombo.document.width
comboheight=document.staticcombo.document.height
setInterval("staticit_ns()",50)
document.staticcombo.visibility="show"
}
}
function staticit_ie(){
staticcombo.style.pixelLeft=document.body.scrollLeft+document.body.clientWidth-combowidth-30
staticcombo.style.pixelTop=document.body.scrollTop+document.body.clientHeight-comboheight
}
function staticit_ns(){
document.staticcombo.left=pageXOffset+window.innerWidth-combowidth-30
document.staticcombo.top=pageYOffset+window.innerHeight-comboheight
}
window.onload=initialize
</script>
thanks
peter
I found this script and would like to use it twice on the same page. meaning two instances of it.
one on the left where it is now, and the other on the right...
ie two FLOATING MENUS
Can anyone please help. The site is
<span id="staticcombo" style="position:absolute;left:0;top:0;visibility:hidden">
<form name="jumpy">
<p><select name="example" size="1" onChange="gone()">
<option value="http://www.codearena.com">CodeArena.com</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.geocities.com">Geocities</option>
<option value="http://www.cnn.com">CNN</option>
</select>
<script language="javascript">
<!--
/*Always-visible combo box credit:
JavaScript Kit (www.javascriptkit.com)
Over 400+ free JavaScripts here!
*/
function gone()
{
location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
}
//-->
</script>
<input type="button" name="test" value="Go!"
onClick="gone()">
</p>
</form>
</span>
<script language="JavaScript1.2">
var combowidth=''
var comboheight=''
function initialize(){
if (document.all){
combowidth=staticcombo.offsetWidth
comboheight=staticcombo.offsetHeight
setInterval("staticit_ie()",50)
staticcombo.style.visibility="visible"
}
else if (document.layers){
combowidth=document.staticcombo.document.width
comboheight=document.staticcombo.document.height
setInterval("staticit_ns()",50)
document.staticcombo.visibility="show"
}
}
function staticit_ie(){
staticcombo.style.pixelLeft=document.body.scrollLeft+document.body.clientWidth-combowidth-30
staticcombo.style.pixelTop=document.body.scrollTop+document.body.clientHeight-comboheight
}
function staticit_ns(){
document.staticcombo.left=pageXOffset+window.innerWidth-combowidth-30
document.staticcombo.top=pageYOffset+window.innerHeight-comboheight
}
window.onload=initialize
</script>
thanks
peter
Comment