Web Analytics Made Easy -
StatCounter Can I do this? - CodingForum

Announcement

Collapse
No announcement yet.

Can I do this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can I do this?

    I am looking for a script that will do the following:

    I want to have a menu that has a list of names on it. I want to have the ability to click on one of the names and have an image appear beside the menu (a different image for each name).


    While looking for a script to do this, I stumbled onto what I want. Check out this site if my description isn't exactly clear.

    http://www.dynamicdrive.com/dynamicindex3/document2.htm

    I want to be able to click on the "blend in" and have a different image appear to the side. I can't figure out how they do that on the site tho. I don't care if the site opens in a "blend in" or "blend out" way.

    Thanks in advance for the help. Hope I was clear.

  • #2
    Someone from the WA forum made tis for me:

    Code:
    <form name="dynamicselector" dir="rtl">
    
    <select name="dynamicselector2" size="4" onChange="generateimage(this.options[this.selectedIndex].value)" TARGET="_New">
    
    <option value="SITES/MavSite.gif" SELECTED > Maverick </option>
    <option value="SITES/BriceSite.gif"   > Brice         </option>
    <option value="SITES/JsSite.gif"      > Little J      </option>
    <option value="SITES/DizzySite.gif"   > Dizzy Duck    </option>
    <option value="SITES/ElmerSite.gif"   > Elmer         </option>
    <option value="SITES/GraveSite.gif"   > Grave Digger  </option>
    <option value="SITES/DsSite.gif"      > Little D      </option>
    <option value="SITES/StangSite.gif"   > Mustang       </option>
    <option value="SITES/SocketSite.gif"  > Sockets       </option>
    <option value="SITES/LsocketSite.gif" > Lady Sockets  </option>
    <option value="SITES/333.gif"         > Ozarks 333    </option>
    <option value="SITES/StarSite.gif"    > Starbuck      </option>
    <option value="SITES/ZippoSite.gif"   > Zippo         </option>
    
    
    </select>
    <BR><BR>
    <TABLE BORDER="1" BORDERCOLOR="#98d0ff" BGCOLOR="#ffffff">
    <TR><TD>
    <FONT SIZE="1" COLOR="#0000ff">
    <ilayer id="dynamic1" width=100% height=178>
    <layer id="dynamic2" width=100% height=178><div id="dynamic3"></div></layer>
    </ilayer>
    </FONT>
    </TD></TR>
    </TABLE>
    </form>
    
    <!--// ########## //-->
    
    <script>
    
    var description=new Array()
    description[0]="Maverick!"
    description[1]="Brice!"
    description[2]="Little J!"
    description[3]="Dizzy Duck!"
    description[4]="Elmer!"
    description[5]="Grave Digger!"
    description[6]="Little D!"
    description[7]="Mustang!"
    description[8]="Sockets!"
    description[9]="Lady Sockets!"
    description[10]="Ozarks 333!"
    description[11]="Starbuck!"
    description[12]="Zippo!"
    
    
    
    var link=new Array()
    link[0]="http://www.angelfire.com/mo/mav"
    link[1]="http://www.angelfire.com/yt/bum1"
    link[2]="http://angelfire.com/mo2/littlej"
    link[3]="http://angelfire.com/al2/dizzyduck"
    link[4]="http://community-2.webtv.net/ElmerMAH4/Elmer"
    link[5]="http://angelfire.com/mo2/GraveDigger"
    link[6]="http://angelfire.com/mo2/LittleD"
    link[7]="http://mustangsbs.com"
    link[8]="http://angelfire.com/ab2/bad"
    link[9]="http://angelfire.com/mo2/ladysockets"
    link[10]="http://members.aol.com/_ht_a/ozarks333/index.html?mtbrand=AOL_US"
    link[11]="http://members.tripod.com/~starbuck051/index1.html"
    link[12]="http://angelfire.com/mo2/zip"
    
    
    var ie4=document.all
    var ns6=document.getElementById
    var tempobj=document.dynamicselector.dynamicselector2
    if (ie4||ns6)
    var contentobj=document.getElementById? document.getElementById("dynamic3"): document.all.dynamic3
    function generateimage(which){
    if (ie4||ns6){
    contentobj.innerHTML='<center>Loading image...</center>'
    contentobj.innerHTML='<center><a href="'+link[tempobj.options.selectedIndex]+'"><img border="0" src="'+which+'"></a><br><br>'+description[tempobj.options.selectedIndex]+'</center>'
    }
    else if (document.layers){
    document.dynamic1.document.dynamic2.document.write('<center><a href="'+link[tempobj.options.selectedIndex]+'"><img border="0" src="'+which+'"></a><br><br>'+description[tempobj.options.selectedIndex]+'</center>')
    document.dynamic1.document.dynamic2.document.close()
    }
    else
    void(0)
    }
    
    function generatedefault(){
    generateimage(tempobj.options[tempobj.options.selectedIndex].value)
    }
    
    if (ie4||ns6||document.layers){
    if (tempobj.options.selectedIndex!=-1){
    if (ns6)
    generatedefault()
    else
    window.onload=generatedefault
    }
    }
    
    </script>
    You can change the code to suit your needs, I believe. The images are also links...
    Quيet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·

    Comment

    Working...
    X