Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-08-2008, 05:57 PM   PM User | #1
Dave1
New to the CF scene

 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Dave1 is an unknown quantity at this point
Combo Box

I am trying to use the same DHTML combo box script on a web page for our church server. I post the same script on the page delete the links and add a new link under the different icon and it shows the same links on the previous icon. I want to use the same code on a different icon with different links. I know how to move the inner menu to position. I just need to make this work on the different icons. Thanks for the help. Dave
I am posting the html code
<script language="JavaScript1.2">

//DHTML combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://www.javascriptkit.com) for script
//Credit must stay intact for use

var ie5=(document.getElementById&&navigator.appName.indexOf("Internet Explorer")!=-1)

if (ie5){
document.write('<span style="position:relative;width:0px;height:0px;border:0px solid black;font:bold 10pt Verdana;padding:0px" onClick="showhide(1);event.cancelBubble=1" ><span style="cursor:hand;width:100%"><img border="0" src="fall.gif" width="150" height="100" alt="Click for drop down menu"></span>')
document.write('<div id="innermenu" style="position:absolute;left:2;top:16;width:240px;height:100px;border:1px solid black;background-autweltile.jpg;overflow-y:scroll;visibility:hidden;">')
}

function gl(linkname,dest){
document.write('<b><a href="'+dest+'">'+linkname+'</a></b><br>')
}

function showhide(state){
var cacheobj=document.getElementById("innermenu").style
if (state==0)
cacheobj.visibility="hidden"
else
cacheobj.visibility=cacheobj.visibility=="hidden"? "visible" : "hidden"
}

//Specify your links here- gl(Item text, Item URL)
if (ie5){
gl("Summer Is Gone","http://www.apolloheightsbaptistchurch.org/autumn/aaleafs/gone.html")
gl("The Autumn of Life","http://www.apolloheightsbaptistchurch.org/autumn/autoflife/life.html")
gl("Autumn Harvest","http://www.apolloheightsbaptistchurch.org/autumn/harvest/time.html")
gl("The Road Less Traveled","http://www.apolloheightsbaptistchurch.org/autumn/rdless/trvld.html")
gl("Life","http://www.apolloheightsbaptistchurch.org/autumn/auttlif/life.html")
gl("Celebrating Autumn","http://www.apolloheightsbaptistchurch.org/autumn/celebrate/aut.html")
gl("Feel A Touch Of Autumn","http://www.apolloheightsbaptistchurch.org/autumn/feel/tofaut.html")
gl("Enjoy The Moment","http://www.apolloheightsbaptistchurch.org/autumn/enjoy/moment.html")
gl("Surrender To The Beauty","http://www.apolloheightsbaptistchurch.org/autumn/surren/beaut.html")
//Extend this list as needed


}

if (ie5){
document.onclick=function(){showhide(0)}
document.write('</div></span>')
}

</script></td>
<td align="center" valign="bottom">
<script language="JavaScript1.2">

//DHTML combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://www.javascriptkit.com) for script
//Credit must stay intact for use

var ie5=(document.getElementById&&navigator.appName.indexOf("Internet Explorer")!=-1)

if (ie5){
document.write('<span style="position:relative;width:0px;height:0px;border:0px solid black;font:bold 10pt Verdana;padding:0px" onClick="showhide(1);event.cancelBubble=1" ><span style="cursor:hand;width:100%"><img border="0" src="winter.gif" width="150" height="100" alt="Click for drop down menu"></span>')
document.write('<div id="innermenu" style="position:absolute;left:2;top:16;width:240px;height:100px;border:1px solid black;background-autweltile.jpg;overflow-y:scroll;visibility:hidden;">')
}

function gl(linkname,dest){
document.write('<b><a href="'+dest+'">'+linkname+'</a></b><br>')
}

function showhide(state){
var cacheobj=document.getElementById("innermenu").style
if (state==0)
cacheobj.visibility="hidden"
else
cacheobj.visibility=cacheobj.visibility=="hidden"? "visible" : "hidden"
}

//Specify your links here- gl(Item text, Item URL)
if (ie5){
gl("Summer Is Gone","http://www.apolloheightsbaptistchurch.org/winter/winof/love.html")
//Extend this list as needed


}

if (ie5){
document.onclick=function(){showhide(0)}
document.write('</div></span>')
}

</script>
Dave1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:12 AM.


Advertisement
Log in to turn off these ads.