Drop down menu hidden behind javascript slider

I have a js slider that is sitting in front of my drop down menu.
I tried the x-index in my css file using position as absolute and nothing...
Can anyone help..I am new to this. I am using Easy Rotator for the slider
Thanks
.servicesdropped {
    display: none;
    text-align: left;
    position: absolute;
    background: #172323;
    font-size: 12px;
    width: 590px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border: 1px solid #000;
    margin: 10px 0 0 20px;
    padding: 10px 20px 20px;
    z-index: 40000;
http://99.98.44.183/TEST_WEB/index2.html#

64 errors is not acceptable.  You still have non-working menus owing to the malformed lists and your slider doesn't work.
I'm trying to be constructive when I say this site is seriously overdue for a re-build.  The table layout with a gazillion spacer.gifs is a relic from 1990's web design.  Practically speaking, this site belongs in a museum.  In the long run, it would be better to re-build it with CSS layouts and modern web practices See Responsive Web Design.
Nancy O.

Similar Messages

  • Spry Drop down menu disappearing behind flash mov

    Hi Can someone help? I have a spry drop down menu that appears fine in IE but in firefox it disappears behind my flash movie! it appears fine if there is just a image. Any ideas?

    This is the wrong part of the forum for this type of problem, and it may be better if you post this type of question (or most questions), to the dreamweaver section.
    That said check your position: absolute: statments in your css, as this is often the cause.
    PZ

  • Drop down menu hidden in IE

    I am making a website with a drop down menu and while it appears in Firefox and Safari fine it doesn't in IE. Instead it seems to be cut off when rolled over.
    Would anyone have any idea what could be causing this issue?
    http://www.khawkinsdesign.com/ecole/index.html
    Many Thanks,
    KJoe

    Mybe need a </li> after:
    <li> <a>Ecole Buissonniere</a>
    Bob

  • Drop Down Menu Hidden By Flash in IE

    http://www.extravaganzacreative.com/moonlight/test2.htm
    My drop down (under "Portfolio") drops behind my Flash movie
    that it should extend over. It works fine on my Mac in FF and
    Safari, I am only seeing it when I test it on my PC in IE.
    I have tried changing the wmode to transparent in all places
    where that is relevant. I have also experimented with z-index
    (although I don't know if this impacts flash movies.)
    I have been stuck on this for days. Not sure if this was the
    best forum to post this at because it combines various members of
    the Creative Suite

    http://www.projectseven.com/support/answers.asp?id=127
    Al Sparber - PVII
    http://www.projectseven.com
    Dreamweaver Menus | Galleries | Widgets
    http://www.projectseven.com/go/apm
    An Accessible & Elegant Accordion
    "extravaganza_" <[email protected]> wrote in
    message
    news:gqecn0$s1$[email protected]..
    >
    http://www.extravaganzacreative.com/moonlight/test2.htm
    >
    > My drop down (under "Portfolio") drops behind my Flash
    movie that it
    > should
    > extend over. It works fine on my Mac in FF and Safari, I
    am only seeing
    > it
    > when I test it on my PC in IE.
    >
    > I have tried changing the wmode to transparent in all
    places where that is
    > relevant. I have also experimented with z-index
    (although I don't know
    > if
    > this impacts flash movies.)
    >
    > I have been stuck on this for days. Not sure if this was
    the best forum
    > to
    > post this at because it combines various members of the
    Creative Suite
    >

  • How to avoid prompting the userid and password in Drop Down Menu

    Hey Guys hope you can help me.
    I have created a page wherein within that page I have a drop down menu using a javascript here is the code (please see my code below): Now the problem is each time I click any of the selection below the useid and password prompt me.
    Is their any way that this can be fixed so that I cann pass the userid and password as a parameter? I have already tried to pass the &SESSION but it does not work.
    Please enlighten me on this one....
    Thanks,
    Henry
    <select name="P300_selected_alert" size="1" onChange="bringMeHere(this.options[selectedIndex].value)">
    <option value="" selected>-Select One-</option>-->
    <option value="All Alerts">All Alerts</option>
         <option value="Acknowledged">Acknowledged</option>
    <option value="Unacknowledge">Unacknowledge</option>
    <option value="Acknowledged-Resolved">Acknowledged-Resolved</option>
         <option value="Acknowledged-Unresolve">Acknowledged-Unresolve</option>
    <option value="Target Name">Target Name</option>
         </select></td>
    </td>
    <script language="JavaScript1.1" type="text/javascript">
    function bringMeHere(a)
    if (a == "Acknowledged")
    location.href="f?p=103:295:12375097291676676231:NO::";
    else
    location.href="f?p=103:300:12375097291676676231:NO::";
    </script>
    ---------------------------------------------------

    Henry,
    See the change I made to your reports region template on page 1, adding the session id to the links as was suggested earlier:
    var Session_Id = html_GetElement('pInstance').value;
    if (a == "Name")
    location.href="f?p=35225:3:"+Session_Id;
    else if (a == "Employee")
    location.href="f?p=35225:2:"+Session_Id;
    else
    location.href="f?p=35225:1:"+Session_Id;
    And again, you do not want to be hard-coding the application ID anywhere in your code.
    Scott

  • Flash Animation Blocks Drop-Down Menu

    I added a simple flash animation (slideshow) to a site I am
    working on which is located under the navigation bar that has a
    drop-down menu (created in Fireworks). When I preview the site in
    Firefox or Internet Explorer on a PC, the drop-down menu is behind
    the flash animation and all of the links cannot be seen. Is there
    an easy solution to this problem?
    Thank you,
    Troy

    "FlineCo" <[email protected]> wrote in
    message
    news:gopblq$c47$[email protected]..
    >I added a simple flash animation (slideshow) to a site I
    am working on
    >which is
    > located under the navigation bar that has a drop-down
    menu (created in
    > Fireworks). When I preview the site in Firefox or
    Internet Explorer on a
    > PC,
    > the drop-down menu is behind the flash animation and all
    of the links
    > cannot be
    > seen. Is there an easy solution to this problem?
    Google "wmode" and use opaque
    Thierry | Adobe Community Expert | Articles and Tutorials ::
    http://www.TJKDesign.com/go/?0
    Spry Widgets |
    http://labs.adobe.com/technologies/spry/samples/
    [click on
    "Widgets"]
    Spry Menu Bar samples |
    http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html

  • JavaScript and Drop down menu help?

    Hi,
    I'm having trouble trying to get options in my drop down menu to update in another section. I have the below script in a hidden field and everything seems to be working but it keeps picking up the last line only when doing calculations (i.e 48) when I change it in the drop down menu to say "HBZ-200" which has the value of 200 it is still only picking up the last line and value of 48.
    So to put a little perspective on things the below script is in a hidden field called stndwatt, I then want to calculate that in another hidden field called calc which has the following calculations - (Qty3+ballconsump)-stndwatt, this should then update my visible field called ElectYear1 which then has the calculations of - (Qty1+Qty2)*(Qty4*Qty5*Qtycost*calcs*weeksinyear)/1000, as far as I can work out my stndwatt field is only picking up the last line below which is 48.
    I'm sorry if this is vague I'm not very familar with JavaScript or PDF forms and have been scratching my head all day with this.
    var v = this.getField("ProductLineOne").value;
    if (v=="T101221W-30 (3000K T10 LED Tube)") event.value = "21";
    else if (v=="T101221W-40 (4000K T10 LED Tube)") event.value = "21";
    else if (v=="T101221W-50 (5000K T10 LED Tube)") event.value = "21";
    else if (v=="T101221W-60 (6000K T10 LED Tube)") event.value = "21";
    else if (v=="HBZ-100 (100W LED High Bay)") event.value = "100";
    else if (v=="HBZ-150 (150W LED High Bay)") event.value = "150";
    else if (v=="HBZ-200 (200W LED High Bay)") event.value = "200";
    else if (v=="ZSL-48W (48W LED Shop Light)") event.value = "48";

    Are you sure the code you posted here is EXACTLY the same as the code in
    your file? Did you copy&paste it?
    If so, can you share the file in question?

  • How do I get a drop down menu to auto default to option selected a value other than the default written in the javascript?

    I use web based software where I have to select from a drop down menu a particular option. However, I only ever use 1 option. Sometimes as much as 100 times a day. Is there anyway to get Firefox to auto select the same option every time? I don't have access to the source code so I cant change <option selected="selected" value="">.

    A possibility would be a Greasemonkey script to do this automatically or a JavaScript bookmarklet to do it manually.
    You would need to remove the selected="selected" from the currently selected option and set that attribute for the wanted option.
    You can test the bookmarklet here:
    *https://developer.mozilla.org/en/HTML/Element/select
    <pre><nowiki>javascript:(function(){var d=document,s=d.getElementsByTagName('SELECT')[0],o=s.getElementsByTagName('OPTION'),S='selected',v='value1',i;for(i=0;O=o[i];i++){if(O.value==v){O.setAttribute(S,S);O.selected=true}else{O.removeAttribute(S);O.selected=false;}}})();</nowiki></pre>
    If there are more 'selects' then you need to adjust the element number [0] and you also need to adjust the value of the wanted option.

  • Pass a url variable to javascript for drop down menu

    Hello,
    I'm in over my head as far as javascript goes. This is what I
    am trying to do. I have this URL...
    http://www.grasshorse.com/prod2.cfm?SortBy=all&ProdAbbr=shm
    I want to take the variable for ProdAbbr which in this case
    is "shm" and make that a variable in javascript. So that I can add
    the variable to a dynamic link I'm using for a drop down menu.
    mm_menu_0520211545_0.addMenuItem("All Departments","location='prod.cfm?SortBy=all&ProdAbb r=eval(ProdAbbr)'");
    I really have no clue what to do. I haven't hardly used
    javascript at all and I'm looking for some charity. Does anyone
    have any ideas on how I can do this?
    Thanks
    Steve
    Any insight is greatly appreciated.

    jawwinker wrote:
    > Hello,
    > I'm in over my head as far as javascript goes. This is
    what I am trying to
    > do. I have this URL...
    >
    > <a target=_blank class=ftalternatingbarlinklarge
    > href="
    http://www.grasshorse.com/prod2.cfm?SortBy=all&ProdAbbr=shm
    >
    > I">
    http://www.grasshorse.com/prod2.cfm?SortBy=all&ProdAbbr=shm
    >
    > I</a> want to take the variable for ProdAbbr which
    in this case is "shm" and
    > make that a variable in javascript. So that I can add
    the variable to a
    > dynamic link I'm using for a drop down menu.
    >
    >
    mm_menu_0520211545_0.addMenuItem("All Departments","location='prod.cfm?Sort
    > By=all&ProdAbbr=eval(ProdAbbr)'");
    mm_menu_0520211545_0.addMenuItem("All Departments","location='prod.cfm?Sort
    By=all&ProdAbbr='"+ProdAbbr+"'");
    Mick

  • The javascript for a drop down menu

    I have a problem. I am new in pdf
    javascripting. What i want to do is to make a drop down menu with multiple items, clicking any of each items will take me to a bookmark or a web addess. I can make the drop menu (this is wuite easy, however without adding java script the drop down menu will be dead. Can someone help me with this script, i will be much obliged if some one has an actual pdf file with that drop down menu and the script. That will be much appreciated my email address is monaahmad at yahoo dot com
    Regrads
    Mona ahmad

    You could  try something like this in your "onchange" event of the drop down.
    var  sSelectedItem = xfa.event.newText; // get the item from the drop down
         switch (sSelectedItem) {
            case "Item 1":
                 window.location = "http://www.website1.com"
                break;
             case "Item 2":
                window.location =  "http://www.website2.com"
                break;

  • I need help changing a drop down menu on a template

    Hi there
    ive been using dreamwearver on and of for a few years now and just about get by,  ive just bought a web site template and although ive managed to ajust most things,
    the template had a drop down menu using CSS  currently on the "about us" option a sub menu drops down, ive worked out how to  add to this menu and change the words
    but what i cant do is have this same drop down menu on another part or the menu system  for example i would like another drop down menu on the "our menu" part
    any help would be much appreciated
    below is the source code
    ive got some js codes to but im not sure if the menu system uses them
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title></title>
        <meta charset="utf-8">
        <link rel="stylesheet" href="css/reset.css" type="text/css" media="screen">
        <link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
        <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
        <link rel="icon" href="images/favicon.ico" type="image/x-icon">
        <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" href="css/ui.totop.css" type="text/css" media="screen">
              <script src="js/jquery-1.7.min.js" type="text/javascript"></script>
        <script src="js/superfish.js" type="text/javascript"></script>
        <script src="js/script.js" type="text/javascript"></script>
              <script src="js/jquery.hoverIntent.js" type="text/javascript"></script>
        <script src="js/tms-0.3.js" type="text/javascript"></script>
        <script src="js/tms_presets.js" type="text/javascript"></script>
        <script src="js/jquery.ui.totop.js" type="text/javascript"></script>
              <script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
                        <!--[if lt IE 8]>
        <div style=' clear: both; text-align:center; position: relative;'>
            <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_b annercode">
                      <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
            </a>
        </div>
              <![endif]-->
        <!--[if lt IE 9]>
                           <script type="text/javascript" src="js/html5.js"></script>
              <![endif]-->
    </head>
    <body id="page1">
    <!--=========================================header======================================= ======-->
            <header>
                <div class="bg-1">
                    <div class="main">
                        <div class="container_24">
                            <div class="wrapper">
                                <article class="grid_24">
                                    <h1><a href="index.html">Alexander</a></h1>
                                </article>
                            </div>
                            <article class="grid_24">
                                <nav>
                                    <ul class="menu">
                                        <li><a class="active" href="index.html">home<span></span></a></li>
                                        <li><a href="menu.html">our menu<span></span></a></li>
                                        <li><a href="about us.html">about  us<span></span></a>
                                            <ul>
                                                <li><a href="#">history</a></li>
                                                <li><a href="#">gallery</a>
                                                <li><a href="#">weddings</a></li>
                                            </ul>
                                        </li>
                                        <li><a href="reservation.html">Reservation<span></span></a></li>
                                        <li><a href="contact us.html">contacts<span></span></a></li>
                                    </ul>
                                    <div class="clear"></div>
                                </nav>
                                <div class="clear"></div>
                                <div class="wrapper">
                                          <div class="col-1 bg-2">
                                              <div>
                                                  <h3>WELCOME TO<span>BALOOS</span></h3>
                                        </div>
                                        <div>
                                                  <div class="color-1">
                                                    <p>Situated in Henfield, Baloos is the creation of chef and restaurateur Chris and Amanda. Chris&rsquo; passion for food using the freshest, local and seasonal produce combined with Amanda&rsquo;s friendly front-of-house charm and personal touch to make Baloos the perfect spot for lunch or evening meal.                                               </p>
                                                  </div>
                                            <a href="#" class="button-1"><span>read more</span></a>
                                        </div>
                                    </div>
                                          <div class="col-2">
                                        <div class="slider_bg">
                                            <div class="slider">
                                                <ul class="items">
                                                    <li><img src="images/slider_1.jpg" alt=""></li>
                                                    <li><img src="images/slider_2.jpg" alt=""></li>
                                                    <li><img src="images/slider_3.jpg" alt=""></li>
                                                    <li><img src="images/slider_4.jpg" alt=""></li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </article>
                            <div class="clear"></div>
                        </div>
                    </div>
                </div>
            </header>
    <!--==============================content================================-->
        <section id="content">
                  <div class="bg-3">
                                  <div class="bg-4">
                          <div class="main">
                              <div class="container_24">
                                  <div class="wrapper">
                                      <article class="grid_24">
                                          <div class="wrapper border-1 margin-bot3">
                                              <article class="grid_6 suffix_2 alpha">
                                                  <h4 class="indent-top margin-bot1">restaurant hours</h4>
                                            <div class="color-3 lh-1 border-2">
                                                      <strong class="title-3 d-block margin-bot2">Bar </strong>
                                                11:30-8:30 Sunday-Thursday<br>
                                                11:30-9:00 Friday and Saturday
                                            </div>
                                            <div class="color-3 lh-1 border-2">
                                                      <strong class="title-3 d-block margin-bot2">Lunch</strong>
                                                Tue.-Sat. 12:00-2pm<br>
                                                No Lunch on Sunday
                                            </div>
                                            <div class="color-3 lh-1">
                                                      <strong class="title-3 d-block margin-bot2">Dinner</strong>
                                                Tuesday-Saturday 6:00- 9:30<br>
                                                Sunday 12:30-4pm
                                            </div>
                                        </article>
                                        <article class="grid_16 omega indent-top1">
                                                  <div class="wrapper">
                                                      <figure class="img-indent-l">
                                                          <img src="images/page1_img1.jpg" alt="">
                                                </figure>
                                                <div class="extra-wrap">
                                                          <div class="title-1"> Welcome!</div>
                                                    <div class="color-4 lh"><span class="color-3">Moleacene anrit ma hasese rayuaumso natoqu eagnis</span><br>
                                                    dist mte dulmuese feugiata lesua  kery ecencies phaledaty
                                                    fenanec sit amm easer ermeolor dapegetele mentum.
                                                    Baelursus eleifneanctor wisi et urna. Aliquam eravolutpatis
                                                    turpisntey yoleacene anritserauas ty miwert betyudes.</div>
                                                    <div class="title-2">chef</div>
                                                    <figure class="sign">
                                                              <img src="images/page1_img2.png" alt="">
                                                    </figure>
                                                </div>
                                            </div>
                                        </article>
                                    </div>
                                    <div class="wrapper border-1 indent-top">
                                              <article class="grid_7 suffix_1 alpha">
                                                  <h4 class="margin-bot4">about BALOOS</h4>
                                            <strong class="color-3 size-1 reg">Moleacene anrit maha deyuas</strong>
                                            <div class="margin-bot">Cum socis natoqu eagn dist mte dulm uese feugiata lesu kery lecenas stricies phaledatyfec sim easer erment.</div>
                                            <a href="#" class="button-2"><span>read more</span></a>
                                        </article>
                                        <article class="grid_16 omega">
                                                  <h4 class="margin-bot"> OUR RECOMENDED dishes of the MONTH</h4>
                                            <div class="wrapper margin-bot3">
                                                      <article class="grid_8 alpha">
                                                          <div class="wrapper">
                                                              <figure class="img-indent-2">
                                                                  <img src="images/page1_img3.jpg" alt="">
                                                        </figure>
                                                        <div class="extra-wrap indent-top2">
                                                                  <a href="#" class="color-6 link2">Grilled Fish</a><br>
                                                            kery lecenas stricies phaledatyfenanec sit amm easer erment. Ut ts dolor dapege telementum.
                                                        </div>
                                                    </div>
                                                </article>
                                                      <article class="grid_8 omega">
                                                          <div class="wrapper">
                                                              <figure class="img-indent-2">
                                                                  <img src="images/page1_img4.jpg" alt="">
                                                        </figure>
                                                        <div class="extra-wrap indent-top2">
                                                                  <a href="#" class="color-6 link2">Chicken Quesadilla</a><br>
                                                            lesuada  kercenas stricies phatyfenanec sit amm easer rment. Ut ts dolor dapege telementum.
                                                        </div>
                                                    </div>
                                                </article>
                                            </div>
                                                  <a href="#" class="button-3"><span>view all recipes</span></a>
                                        </article>
                                    </div>
                                </article>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    <!--==============================footer================================-->
        <footer>
                  <div class="main">
                      <div class="container_24">
                          <div class="wrapper indent-bottom">
                              <article class="grid_14">
                                  <nav>
                                      <ul class="menu2">
                                    <li><a class="active" href="index.html">home</a></li>
                                    <li><a href="menu.html">our menu</a></li>
                                    <li><a href="about us.html">about us</a></li>
                                    <li><a href="reservation.html">Reservation</a></li>
                                    <li><a href="contact us.html">contacts</a></li>
                                </ul>
                            </nav>
                        </article>
                        <article class="grid_10">
                            <div class="indent-top3">
                                <div class="border-3 prefix_1">
                                    <div class="title-4">Find Us On Social Network:</div>
                                    <p class="p0 size-2 color-7">Bayarsety kertya aset aplicaboes kerasaer </p>
                                    <ul class="soc_list">
                                        <li><a href="#"><img src="images/soc_1.png" alt=""></a></li>
                                        <li><a href="#"><img src="images/soc_2.png" alt=""></a></li>
                                        <li><a href="#"><img src="images/soc_3.png" alt=""></a></li>
                                        <li><a href="#"><img src="images/soc_4.png" alt=""></a></li>
                                        <li><a href="#"><img src="images/soc_5.png" alt=""></a></li>
                                    </ul>
                                </div>
                            </div>
                        </article>
                    </div>
                    <div class="wrapper border-4">
                              <article class="grid_24 aligncenter down">
                                  BALOOS &copy; 2013 &bull; <a href="Privacy.html" class="link2">Privacy policy</a> &bull;
                            <span class="d-block"><!--{%FOOTER_LINK} --></span>
                        </article>
                    </div>
                </div>
            </div>
        </footer>
    <script type="text/javascript">
              $(window).load(function(){
            $('.slider')._TMS({
                duration:800,
                preset:'simpleFade',
                pagination:true,//'.pagination',true,'<ul></ul>'
                pagNums:false,
                slideshow:7000,
    </script>
    </body>
    </html>
    HERE IS THE CCS CODE
    @import url(http://fonts.googleapis.com/css?family=Amethysta);
    @import url(http://fonts.googleapis.com/css?family=Mr+De+Haviland);
    @import url(http://fonts.googleapis.com/css?family=Mr+Dafoe);
    /* Getting the new tags to behave */
    article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, meter, nav, output, progress, section, source, video {display:block;}
    mark, rp, rt, ruby, summary, time {display:inline;}
    /* Global properties ======================================================== */
    html {width:100%;}
    html, body {height:100%;}
    body {           
              font-family:Arial, Helvetica, sans-serif;
              color:#666666;
              min-width:960px;
              background:#efefef;
              font-size:14px;
              line-height:22px;
    .main {
              width:960px;
              padding:0;
              margin:0 auto;
              position:relative;
    a {color:#666666; outline:none; text-decoration:none;}
    a:hover {text-decoration:none;}
    .link {text-decoration:underline;}
    .link2:hover {text-decoration:underline;}
    .wrapper {width:100%; overflow:hidden;}
    .extra-wrap {overflow:hidden;}
    p {margin-bottom:22px;}
    .p0 {margin-bottom:0;}
    .p1 {margin-bottom:0;}
    .d-in-block {display:inline-block;}
    .d-block {display:block;}
    .reg {text-transform:uppercase;}
    .rel {position:relative;}
    .fleft {float:left;}
    .fright {float:right;}
    .alignright {text-align:right;}
    .aligncenter {text-align:center;}
    .img-indent-l {float:left; margin:0px 39px 0px 0px;}
    .img-indent-2 {float:left; margin:0px 32px 0px 0px;}
    .img-indent-3 {float:left; margin:6px 32px 0px 0px;}
    /*********************************boxes**********************************/
    .indent {padding:0;}
    .indent-left {padding-left:0;}
    .indent-bottom {padding-bottom:25px;}
    .indent-right {padding-right:0;}
    .indent-top {padding-top:39px;}
    .indent-top1 {padding-top:37px;}
    .indent-top2 {padding-top:6px;}
    .indent-top3 {padding-top:29px;}
    .indent-top4 {padding-top:40px;}
    .indent-top5 {padding-top:8px;}
    .margin-top { margin-top:0;}
    .margin-bot {margin-bottom:33px;}
    .margin-bot1 {margin-bottom:26px;}
    .margin-bot2 {margin-bottom:9px;}
    .margin-bot3 {margin-bottom:29px;}
    .margin-bot4 {margin-bottom:23px;}
    .margin-bot5 {margin-bottom:19px;}
    .margin-bot6 {margin-bottom:11px;}
    .margin-bot7 {margin-bottom:42px;}
    .margin-left {margin-left:0;}
    .margin-right {margin-right:20px;}
    .margin-right1 {margin-right:30px;}
    /*********************************header*************************************/
    header {
              width:100%;
              background:url(../images/header.jpg) center top no-repeat #282829;
    h1 {
              padding:32px 0 23px 299px;
              h1 a {
                        display:block;
                        text-indent:-9999px;
                        background:url(../images/logo.png) no-repeat 0 0;
                        width:316px;
                        height:86px;
    /***** menu *****/
    header nav {
              float:left;
              background:url(../images/menu_r.png) right 38px no-repeat;
              width:100%;
    .menu {
              float:left;
              padding:9px 0 8px 84px;
              position:relative;
              z-index:20;
              font-family: 'Amethysta', serif;
              background:url(../images/menu_l.png) left 38px no-repeat;
    .menu li {
              float:left;
              position:relative;
              background:url(../images/menu2.png) left top no-repeat;
              padding:27px 45px 24px 42px;
    .menu li:first-child {
              background:none;
              padding-left:0;
    .menu li a {
              display:block;
              font-size:16px;
              line-height:20px;
              color:#dbdada;
              text-transform:uppercase;
              z-index:20;
    .menu li a span {
              display:block;
              width:18px;
              height:9px;
              background:url(../images/sub.png) left top no-repeat;
              position:absolute;
              top:-999px;
              left:50%;
              margin-left:-9px;
    .menu li:first-child a span {
              margin-left:-33px;
    .menu li.sfHover {
              position:relative;
              z-index:10;
    .menu li a.active span,
    .menu > li > a:hover span,
    .menu > li.sfHover > a span {
              top:-9px;
    .menu ul {
              z-index:20;
              letter-spacing:normal;
              position:                    absolute;
              top:                              -9999em;
              width:                              100px;
              background:url(../images/menu4.gif) left top repeat;
              border:                              none;
              box-shadow:5px 5px 5px rgba(0,0,0, .26);
              padding:6px 20px 10px;
    .menu ul ul {
              background-image:url(../images/menu5.gif);
    .menu ul li {width:          100%;}
    .menu li:hover {visibility:          inherit; }
    .menu li li {
              margin:0;
              border:none;
              padding:9px 0 6px 0;
              background:url(../images/menu6.png) left top repeat-x;
    .menu li li li {
              background-image:url(../images/menu7.png);
    .menu li li:first-child {
              background:none;
    .menu li li a {
              background:none;
              display:                    block;
              padding:                    0 0 0 6px;
              font-size:                    14px;
              line-height:          17px;
              color:                              #fff;
    .menu li li > a:hover,
    .menu li li.sfHover > a {
              color:#b16167;
    .menu li:hover ul, .menu li.sfHover ul {
              left:                              22px;
              top:                              79px;
              z-index:                    999;
    ul.menu li:hover li ul, ul.menu li.sfHover li ul {
              top:                              -999em;
    ul.menu li li:hover ul, ul.menu li li.sfHover ul {
              left:                              100px;
              top:                              -6px;
              z-index:                    99;
    ul.menu li li:hover li ul, ul.menu li li.sfHover li ul {
              top:                              -999em;
    /*********************************content*************************************/
    #content {
              width:100%;
              background:url(../images/bg-1.jpg) center -464px no-repeat #020202;
              padding:0;
    #page1 #content {
              margin-top:-194px;
    .col-1 {
              float:left;
              width:360px;
    .col-2 {
              float:left;
              width:590px;
    .col-3 {
              float:left;
              width:300px;
    .col-4 {
              float:left;
              width:280px;
    .sign {
              text-align:right;
              padding:10px 40px 0 0;
    .letter {
              text-align:center;
              font-family: 'Mr Dafoe', cursive;
              font-size:70px;
              line-height:84px;
              color:#cbcbcb;
              float:left;
              width:60px;
              margin-right:15px;
    /******************* slider *************/
    .slider_bg {
              background:url(../images/slider_bg.jpg) left top no-repeat;
              overflow:hidden;
              width:590px;
              height:429px;
              overflow:hidden;
    .slider {
              width:534px;
              height:429px;
              position:relative;
              background:url(../images/preloader.png) center center no-repeat;
    .pagination {
              position:absolute;
              right:-37px;
              top:21px;
              overflow:hidden;
              z-index:999;
    .pagination li {
              margin-top:3px
    .pagination li:first-child {
              margin-top:0;
    .pagination li a {
              display:block;
              width:15px;
              height:15px;
              background:url(../images/pag_nav.png) left bottom no-repeat;
    .pagination li a:hover,
    .pagination .current a {
              background-position:left top;
    .pagination .current a {
              cursor:default;
    .items {display:none;}
    /******************* slideshow *************/
    #slideshow {
              width:620px;
              height:705px;
              overflow:hidden;
              background:none !important;
    #slideshow>div {
              width:620px;
              height:705px;
              background:none !important;
    #prev {
              float:left;
    #next {
              float:left;
    #nav {
              overflow:hidden;
              padding:0px 15px 0;
              float:right;
    #nav li {
              float:left;
              font-size:13px;
              line-height:16px;
              text-align:center;
              margin-left:1px;
              display:block !important;
    #nav li:first-child {
              margin-left:0;
    #nav li a {
              color:#666666;
              display:block;
              width:14px;
              height:16px;
              overflow:hidden;
    #nav .activeSlide a,
    #nav li a:hover {
              color:#fff;
    .nav_wrap {
              overflow:hidden;
              position:absolute;
              width:200px;
              height:30px;
              right:97px;
              top:-33px;
    #next,
    #prev {
              text-indent:-9999px;
              float:right;
              overflow:hidden;
              display:block;
              width:10px;
              height:18px;
    #next {
              background:url(../images/next.png) left top no-repeat;
    #prev {
              background:url(../images/prev.png) left top no-repeat;
    #next:hover ,
    #prev:hover {
              background-position:right top;
    /*********************************bg's*************************************/
    .bg-1 {
              background:url(../images/light.png) center top no-repeat;
    .bg-2 {
              background:url(../images/bg-2.jpg) left top no-repeat;
              height:429px;
              overflow:hidden;
              text-align:center;
    .bg-2>div {
              padding:80px 15px 0 0;
    .bg-2>div+div {
              font-size:13px;
              line-height:20px;
              padding:27px 45px 0 50px;
    .bg-3 {
              background:url(../images/bg-4.png) left top repeat-x;
    .bg-4 {
              background:url(../images/bg-5.png) left bottom repeat-x;
              padding:70px 0 35px;
    #page1 .bg-4 {
              padding:225px 0 35px;
    .bg-5 {
              background:url(../images/bg-7.png) center top no-repeat;
    .bg-6 {
              background:url(../images/bg-8.gif) center top repeat-x;
    .border-1 {
              background:url(../images/border-1.png) left top repeat-x;
    .border-2 {
              border-bottom:1px dotted #313131;
              padding:0 0 18px;
              margin:0 0 15px;
    #page3 .border-2 {
              padding:0 0 23px;
              margin:0 0 14px;
    #page4 .border-2 {
              padding:0 0 35px;
              margin:0 0 37px;
    .border-3 {
              background:url(../images/border-2.png) left top repeat-y;
              padding:5px 0 4px;
    .border-4 {
              background:url(../images/border-3.png) left top repeat-x;
    /*********************************buttons*************************************/
    .button-1 {
              display:inline-block;
              font-size:18px;
              line-height:22px;
              color:#f9dfdf;
              font-family: 'Amethysta', serif;
              text-transform:uppercase;
              background:url(../images/button1_l.png) left 5px no-repeat;
              padding:0 0 0 23px;
    .button-1 span {
              display:block;
              background:url(../images/button1_r.png) right 5px no-repeat;
              padding:0 29px 0 4px;
    .button-1:hover {
              color:#1d1d1d;
    .button-2 {
              display:inline-block;
              text-transform:uppercase;
              font-family: 'Amethysta', serif;
              font-size:14px;
              line-height:17px;
              color:#fff;
              background:url(../images/button-2.gif) left bottom repeat-x;
              height:41px;
              overflow:hidden;
              border:1px solid #343434;
    .button-2 span {
              display:block;
              padding:13px 16px 11px 14px;
    .button-2:hover {
              background-position:left top;
    .button-3 {
              text-align:right;
              text-transform:uppercase;
              display:block;
              background:url(../images/button-2.gif) left bottom repeat-x;
              height:41px;
              border:1px solid #323232;
              font-size:16px;
              line-height:20px;
              color:#bfbfbf;
              font-family: 'Amethysta', serif;
    .button-3:hover {
              background-position:left top;
    .button-3 span {
              background:url(../images/marker-1.png) left 11px no-repeat;
              display:inline-block;
              padding:11px 19px 0 18px;
    /*********************************lists*************************************/
    .dl-1 dt {
              color:#fff;
    .dl-1 dd {
              overflow:hidden;
    .dl-1 dd span {
              display:block;
              float:left;
              width:100px;
    .soc_list {
              overflow:hidden;
              padding:19px 0 0;
    .soc_list li {
              float:left;
              margin-left:10px;
    .soc_list li:first-child {
              margin-left:0;
    .soc_list li a {
              display:block;
              width:32px;
              height:32px;
    .ul-1 li {
              font-size:14px;
              line-height:20px;
              font-family:Arial, Helvetica, sans-serif;
    .ul-1 li a {
              color:#b7b7b7;
    .ul-1 li a:hover {
              color:#fff;
    /*********************************fonts*************************************/
    h3 {
              font-size:28px;
              line-height:34px;
              color:#fbecec;
              font-family: 'Amethysta', serif;
              font-weight:normal;
              text-transform:uppercase;
              background:url(../images/bg-3.png) left bottom no-repeat;
              padding:0 0 33px 0;
    h3 span {
              display:block;
              margin-top:-5px;
              color:#f7d3d3;
    h4 {
              font-size:16px;
              line-height:20px;
              color:#dbdada;
              font-family:'Amethysta', serif;
              font-weight:normal;
              text-transform:uppercase;
    .title-1 {
              color:#a0a0a0;
              font-family:'Mr De Haviland', cursive;
              font-size:72px;
              line-height:87px;
              margin:-8px 0 15px 0;
              padding-left:5px;
    .title-2 {
              text-align:right;
              padding:12px 90px 0 0;
              color:#dddcdc;
              font-family:'Amethysta', serif;
              font-size:18px;
              line-height:22px;
              text-transform:uppercase;
    .title-3 {
              font-size:13px;
              line-height:18px;
              color:#fff;
    .title-4 {
              color:#464646;
              font-family:'Amethysta', serif;
              font-size:18px;
              line-height:22px;
              text-transform:uppercase;
              margin-bottom:3px;
    .lh {
              line-height:23px;
    .lh-1 {
              line-height:20px;
    .size-1 {
              font-size:13px;
              display:block;
    .size-2 {
              font-size:11px;
              line-height:14px;
    .color-1 {color:#e4d0d1;}
    .color-2 {color:#dcb0b1;}
    .color-3 {color:#b7b7b7;}
    .color-4 {color:#7e7e7e;}
    .color-5 {color:#b2b2b2;}
    .color-6 {color:#fff;}
    .color-7 {color:#919191;}
    /******* form's ********/
    /***** contact form *****/
              #form1 fieldset {
                        border:none;
                        padding:0;
                                  #form1 label {
                                            display:block;
                                            min-height:57px;
                                  #form1 label.message {
                                            height:232px;
                                  .inp {
                                            display:block;
                                            width:320px;
                                            height:40px;
                                            padding:0 14px;
                                            background:url(../images/inp-1.png) left top repeat;
                                            overflow:hidden;
                                            position:relative;
                                            border:1px solid #343434
                                  #form1 input {
                                            width:320px;
                                            padding:12px 0 12px;
                                            margin:0;
                                            font-family:Arial, Helvetica, sans-serif;
                                            font-size:14px;
                                            height:16px;
                                            color:#666;
                                            border:none;
                                            background:none;
                                            outline:none;
                                  #form1 .area .error { float:none;}
                                  .text_a {
                                            position:relative;
                                            overflow:hidden;
                                            display:block;
                                            width:478px;
                                            height:230px;
                                            padding:0 14px;
                                            background:url(../images/inp-1.png) left top repeat;
                                            border:1px solid #343434
                                  #form1 textarea {
                                            height:216px;
                                            margin:0;
                                            width:478px;
                                            padding:12px 0;
                                            font-family:Arial, Helvetica, sans-serif;
                                            font-size:14px;
                                            color:#666;
                                            border:none;
                                            background:none;
                                            overflow:auto;
                                            outline:none;
                                            resize:none;
                                  #form1 a {cursor:pointer;}
                                            #form1 .success {display:none; margin-bottom:10px;}
                                            #form1 .error,
                                            #form1 .empty {
                                                      color:#f00;
                                                      font-size:11px;
                                                      line-height:18px;
                                                      display:none;
                                                      overflow:hidden;
                        #form1 .buttons-wrapper {text-align:right; padding-top:40px; position:relative;}
                        #form1 .buttons-wrapper a { margin-left:30px;}
              #form2 fieldset {
                        border:none;
                        padding:0;
                                  #form2 label {
                                            display:block;
                                            min-height:57px;
                                  #form2 label.message {
                                            height:232px;
                                  .inp2 {
                                            display:block;
                                            width:318px;
                                            height:40px;
                                            padding:0 14px;
                                            background:url(../images/inp-1.png) left top repeat;
                                            overflow:hidden;
                                            position:relative;
                                            border:1px solid #343434
                                  #form2 input {
                                            width:318px;
                                            padding:12px 0 12px;
                                            margin:0;
                                            font-family:Arial, Helvetica, sans-serif;
                                            font-size:14px;
                                            height:16px;
                                            color:#666;
                                            border:none;
                                            background:none;
                                            outline:none;
                                  #form2 .area .error { float:none;}
                                  .text_a2 {
                                            position:relative;
                                            overflow:hidden;
                                            display:block;
                                            width:318px;
                                            height:230px;
                                            padding:0 14px;
                                            background:url(../images/inp-1.png) left top repeat;
                                            border:1px solid #343434
                                  #form2 textarea {
                                            height:206px;
                                            margin:0;
                                            width:318px;
                                            padding:12px 0;
                                            font-family:Arial, Helvetica, sans-serif;
                                            font-size:14px;
                                            color:#666;
                                            border:none;
                                            background:none;
                                            overflow:auto;
                                            outline:none;
                                            resize:none;
                                  #form2 a {cursor:pointer;}
                                            #form2 .success {display:none; margin-bottom:10px;}
                                            #form2 .error,
                                            #form2 .empty {
                                                      color:#f00;
                                                      font-size:11px;
                                                      line-height:18px;
                                                      display:none;
                                                      overflow:hidden;
                        #form2 .buttons-wrapper {text-align:right; padding-top:40px; position:relative;}
                        #form2 .buttons-wrapper a { margin-left:30px;}
    .map {
              width:350px;
              height:365px;
              margin:0 0 26px;
    /*******

    Hi -
    While I am not familiar with the use of all the span tags I see,
    You said "currently on the "about us" option a sub menu drops down, ive worked out how to  add to this menu and change the words"
    What is the problem doing the same thing under the other top level item?

  • Drop down menu in CSS

    After someone suggested the P7 link (
    http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm[i
    ), I was able to reverse engineer it and figure out how it works
    (obviously not a feat of genius, but I'm new at this). Anyway, I
    got it working, made some changes to and and had a functioning
    horizontal drop down menu bar to pop into my own site.
    So I renamed everything, linked the .js to the HTML page in
    the <head>, put the CSS into the attached style sheet, etc.
    Everything was going great until I previewed it and realized that
    the drop downs were happening behind the "bottom_half_wrapper"
    elements rather than on top of them all.
    So then I played with the z-index and put the nav bar on the
    2nd level. No dice.
    Also, you cannot scroll down the drop down menus without them
    disappearing.
    How should I be approaching this? I think that what is
    especially hindering me is my lack of javascript knowledge. I am
    under the gun at work and learning all of this on the fly. I have
    attached the relevent code, but cannot publish the site since I am
    at a large educational institution and do not have permission to
    publish it to our server yet.
    Thanks!

    I don't think there is a correct answer to your questions, just opinions and options that all have a place in design decisions.  Not all people will allow javascript or Flash content, so sticking with a CSS/html approach will help maximize the potential audience.  But CSS/html-only solutions can end up lacking interesting functional/interactive elements.  So the choice really comes down to using what works best to make the site performance what it needs to be.

  • DW CS4 Horizontal Spry drop down menu not displaying correctly in Internet Explorer 8

    Hi,
    I have created a horizontal Spry drop down menu in Dreamweaver CS4 with my own background images. I have done various modifications to the CSS script to accommodate the style and feel needed; including making the main buttons' height twice the size of the sub menu buttons and some alignments. It seems to work different depending which browser is used.
    It works well in Google Chrome.
    It works well in Firefox with the exception that if any of the buttons are clicked, thereafter a thin black line is diplayed horizontally across center of the top main buttons when the mouse rolls over them. I would like to correct this but is not nearly as bad as the problem I'm having in Internet Explorer 8.
    Here is my biggest concern and I would greatly appreciate if anyone can shed some light on this matter.
    Once opened in Internet Explorer 8 the main navigation buttons appear as they should. IE8 prompts me the following: "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options..". Once I allow IE8 to run scripts or ActiveX controls, the background image disappears and only shows on any menu or submenu button when the mouse rolls over that particular button. Can someone please help.
    The menu can be seen at work by clicking on this link:
    www.bargainxchange.com/BXC Main Navigation Spry Drop Menu.html
    Below are all the scrips involved.
    Here is the CSS script named "SpryMenuBarHorizontal4.css" in use :
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 10;
        padding: 0;
        list-style-type: none;
        font-size: 80%;
        cursor: default;
        width: auto;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        text-align: center;
        /*whole menu moves*/
        margin-left: 100px;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* My Note --Top buttons' background, height and font size adjust-- */
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        /* My note --I added the height and background-image as Main-Buttons.jpg-- */
        height: 55px;   
        background-image: url(../Main-Buttons.jpg);
        margin: -2;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: center;
        /*text-align: left;*/
        cursor: pointer;
        width: 99px;
        float: left;
    /* My note --Submenu font size adjust-- */
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        /*height:38px;*/
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 87%;
        z-index: 1020;
        cursor: default;
        width: 160px;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        /* My note --this margin alligns the drop buttons up and down-- */
        margin-top: 24px;
        height: 25px;   
        left: auto;
    /* My note --drop menu size adjustments-- */
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        height: 25px;
        width: 160px;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position:absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        /*border: 1px solid #CCC;*/
    /* My note --Text Allignment global-- */
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        /*height: 40px;*/
        text-align: center;
        /*vertical-align: center;*/
        display: block;
        cursor: pointer;
        padding: 0.5em 0.75em;
        text-decoration: none;
        /*zzzzzzzz Text Color*/
        color: #333;        /*background-color: #CCC;*/
        letter-spacing: -0.00px;
        margin-left: 1px;   
        margin-right: 0px;
        /*alligns text up or down globally*/
        margin-top: 1px;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        /*background-color: #33C;
        color: #FFF;*/
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-image: url(../Main-Buttons-mouse-over.jpg);    /*background-color: #33C;
        color: #FFF;*/
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* My note --mouse over-- */
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f&#92;loat: left;
            background: #FFF;
    Here is the JavaScrip file named "SpryMenuBar.js" that has not been modified in any way:
    // SpryMenuBar.js - version 0.12 - Spry Pre-Release 1.6.1
    // Copyright (c) 2006. Adobe Systems Incorporated.
    // All rights reserved.
    // Redistribution and use in source and binary forms, with or without
    // modification, are permitted provided that the following conditions are met:
    //   * Redistributions of source code must retain the above copyright notice,
    //     this list of conditions and the following disclaimer.
    //   * Redistributions in binary form must reproduce the above copyright notice,
    //     this list of conditions and the following disclaimer in the documentation
    //     and/or other materials provided with the distribution.
    //   * Neither the name of Adobe Systems Incorporated nor the names of its
    //     contributors may be used to endorse or promote products derived from this
    //     software without specific prior written permission.
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    // POSSIBILITY OF SUCH DAMAGE.
    SpryMenuBar.js
    This file handles the JavaScript for Spry Menu Bar.  You should have no need
    to edit this file.  Some highlights of the MenuBar object is that timers are
    used to keep submenus from showing up until the user has hovered over the parent
    menu item for some time, as well as a timer for when they leave a submenu to keep
    showing that submenu until the timer fires.
    var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {};
    Spry.BrowserSniff = function()
        var b = navigator.appName.toString();
        var up = navigator.platform.toString();
        var ua = navigator.userAgent.toString();
        this.mozilla = this.ie = this.opera = this.safari = false;
        var re_opera = /Opera.([0-9&#92;.]*)/i;
        var re_msie = /MSIE.([0-9&#92;.]*)/i;
        var re_gecko = /gecko/i;
        var re_safari = /(applewebkit|safari)&#92;/([&#92;d&#92;.]*)/i;
        var r = false;
        if ( (r = ua.match(re_opera))) {
            this.opera = true;
            this.version = parseFloat(r[1]);
        } else if ( (r = ua.match(re_msie))) {
            this.ie = true;
            this.version = parseFloat(r[1]);
        } else if ( (r = ua.match(re_safari))) {
            this.safari = true;
            this.version = parseFloat(r[2]);
        } else if (ua.match(re_gecko)) {
            var re_gecko_version = /rv:&#92;s*([0-9&#92;.]+)/i;
            r = ua.match(re_gecko_version);
            this.mozilla = true;
            this.version = parseFloat(r[1]);
        this.windows = this.mac = this.linux = false;
        this.Platform = ua.match(/windows/i) ? "windows" :
                        (ua.match(/linux/i) ? "linux" :
                        (ua.match(/mac/i) ? "mac" :
                        ua.match(/unix/i)? "unix" : "unknown"));
        this[this.Platform] = true;
        this.v = this.version;
        if (this.safari &amp;&amp; this.mac &amp;&amp; this.mozilla) {
            this.mozilla = false;
    Spry.is = new Spry.BrowserSniff();
    // Constructor for Menu Bar
    // element should be an ID of an unordered list (&lt;ul&gt; tag)
    // preloadImage1 and preloadImage2 are images for the rollover state of a menu
    Spry.Widget.MenuBar = function(element, opts)
        this.init(element, opts);
    Spry.Widget.MenuBar.prototype.init = function(element, opts)
        this.element = this.getElement(element);
        // represents the current (sub)menu we are operating on
        this.currMenu = null;
        this.showDelay = 250;
        this.hideDelay = 600;
        if(typeof document.getElementById == 'undefined' || (navigator.vendor == 'Apple Computer, Inc.' &amp;&amp; typeof window.XMLHttpRequest == 'undefined') || (Spry.is.ie &amp;&amp; typeof document.uniqueID == 'undefined'))
            // bail on older unsupported browsers
            return;
        // Fix IE6 CSS images flicker
        if (Spry.is.ie &amp;&amp; Spry.is.version &lt; 7){
            try {
                document.execCommand("BackgroundImageCache", false, true);
            } catch(err) {}
        this.upKeyCode = Spry.Widget.MenuBar.KEY_UP;
        this.downKeyCode = Spry.Widget.MenuBar.KEY_DOWN;
        this.leftKeyCode = Spry.Widget.MenuBar.KEY_LEFT;
        this.rightKeyCode = Spry.Widget.MenuBar.KEY_RIGHT;
        this.escKeyCode = Spry.Widget.MenuBar.KEY_ESC;
        this.hoverClass = 'MenuBarItemHover';
        this.subHoverClass = 'MenuBarItemSubmenuHover';
        this.subVisibleClass ='MenuBarSubmenuVisible';
        this.hasSubClass = 'MenuBarItemSubmenu';
        this.activeClass = 'MenuBarActive';
        this.isieClass = 'MenuBarItemIE';
        this.verticalClass = 'MenuBarVertical';
        this.horizontalClass = 'MenuBarHorizontal';
        this.enableKeyboardNavigation = true;
        this.hasFocus = false;
        // load hover images now
        if(opts)
            for(var k in opts)
                if (typeof this[k] == 'undefined')
                    var rollover = new Image;
                    rollover.src = opts[k];
            Spry.Widget.MenuBar.setOptions(this, opts);
        // safari doesn't support tabindex
        if (Spry.is.safari)
            this.enableKeyboardNavigation = false;
        if(this.element)
            this.currMenu = this.element;
            var items = this.element.getElementsByTagName('li');
            for(var i=0; i&lt;items.length; i++)
                if (i &gt; 0 &amp;&amp; this.enableKeyboardNavigation)
                    items[i].getElementsByTagName('a')[0].tabIndex='-1';
                this.initialize(items[i], element);
                if(Spry.is.ie)
                    this.addClassName(items[i], this.isieClass);
                    items[i].style.position = "static";
            if (this.enableKeyboardNavigation)
                var self = this;
                this.addEventListener(document, 'keydown', function(e){self.keyDown(e); }, false);
            if(Spry.is.ie)
                if(this.hasClassName(this.element, this.verticalClass))
                    this.element.style.position = "relative";
                var linkitems = this.element.getElementsByTagName('a');
                for(var i=0; i&lt;linkitems.length; i++)
                    linkitems[i].style.position = "relative";
    Spry.Widget.MenuBar.KEY_ESC = 27;
    Spry.Widget.MenuBar.KEY_UP = 38;
    Spry.Widget.MenuBar.KEY_DOWN = 40;
    Spry.Widget.MenuBar.KEY_LEFT = 37;
    Spry.Widget.MenuBar.KEY_RIGHT = 39;
    Spry.Widget.MenuBar.prototype.getElement = function(ele)
        if (ele &amp;&amp; typeof ele == "string")
            return document.getElementById(ele);
        return ele;
    Spry.Widget.MenuBar.prototype.hasClassName = function(ele, className)
        if (!ele || !className || !ele.className || ele.className.search(new RegExp("&#92;&#92;b" + className + "&#92;&#92;b")) == -1)
            return false;
        return true;
    Spry.Widget.MenuBar.prototype.addClassName = function(ele, className)
        if (!ele || !className || this.hasClassName(ele, className))
            return;
        ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.MenuBar.prototype.removeClassName = function(ele, className)
        if (!ele || !className || !this.hasClassName(ele, className))
            return;
        ele.className = ele.className.replace(new RegExp("&#92;&#92;s*&#92;&#92;b" + className + "&#92;&#92;b", "g"), "");
    // addEventListener for Menu Bar
    // attach an event to a tag without creating obtrusive HTML code
    Spry.Widget.MenuBar.prototype.addEventListener = function(element, eventType, handler, capture)
        try
            if (element.addEventListener)
                element.addEventListener(eventType, handler, capture);
            else if (element.attachEvent)
                element.attachEvent('on' + eventType, handler);
        catch (e) {}
    // createIframeLayer for Menu Bar
    // creates an IFRAME underneath a menu so that it will show above form controls and ActiveX
    Spry.Widget.MenuBar.prototype.createIframeLayer = function(menu)
        var layer = document.createElement('iframe');
        layer.tabIndex = '-1';
        layer.src = 'javascript:""';
        layer.frameBorder = '0';
        layer.scrolling = 'no';
        menu.parentNode.appendChild(layer);
        layer.style.left = menu.offsetLeft + 'px';
        layer.style.top = menu.offsetTop + 'px';
        layer.style.width = menu.offsetWidth + 'px';
        layer.style.height = menu.offsetHeight + 'px';
    // removeIframeLayer for Menu Bar
    // removes an IFRAME underneath a menu to reveal any form controls and ActiveX
    Spry.Widget.MenuBar.prototype.removeIframeLayer =  function(menu)
        var layers = ((menu == this.element) ? menu : menu.parentNode).getElementsByTagName('iframe');
        while(layers.length &gt; 0)
            layers[0].parentNode.removeChild(layers[0]);
    // clearMenus for Menu Bar
    // root is the top level unordered list (&lt;ul&gt; tag)
    Spry.Widget.MenuBar.prototype.clearMenus = function(root)
        var menus = root.getElementsByTagName('ul');
        for(var i=0; i&lt;menus.length; i++)
            this.hideSubmenu(menus[i]);
        this.removeClassName(this.element, this.activeClass);
    // bubbledTextEvent for Menu Bar
    // identify bubbled up text events in Safari so we can ignore them
    Spry.Widget.MenuBar.prototype.bubbledTextEvent = function()
        return Spry.is.safari &amp;&amp; (event.target == event.relatedTarget.parentNode || (event.eventPhase == 3 &amp;&amp; event.target.parentNode == event.relatedTarget));
    // showSubmenu for Menu Bar
    // set the proper CSS class on this menu to show it
    Spry.Widget.MenuBar.prototype.showSubmenu = function(menu)
        if(this.currMenu)
            this.clearMenus(this.currMenu);
            this.currMenu = null;
        if(menu)
            this.addClassName(menu, this.subVisibleClass);
            if(typeof document.all != 'undefined' &amp;&amp; !Spry.is.opera &amp;&amp; navigator.vendor != 'KDE')
                if(!this.hasClassName(this.element, this.horizontalClass) || menu.parentNode.parentNode != this.element)
                    menu.style.top = menu.parentNode.offsetTop + 'px';
            if(Spry.is.ie &amp;&amp; Spry.is.version &lt; 7)
                this.createIframeLayer(menu);
        this.addClassName(this.element, this.activeClass);
    // hideSubmenu for Menu Bar
    // remove the proper CSS class on this menu to hide it
    Spry.Widget.MenuBar.prototype.hideSubmenu = function(menu)
        if(menu)
            this.removeClassName(menu, this.subVisibleClass);
            if(typeof document.all != 'undefined' &amp;&amp; !Spry.is.opera &amp;&amp; navigator.vendor != 'KDE')
                menu.style.top = '';
                menu.style.left = '';
            if(Spry.is.ie &amp;&amp; Spry.is.version &lt; 7)
                this.removeIframeLayer(menu);
    // initialize for Menu Bar
    // create event listeners for the Menu Bar widget so we can properly
    // show and hide submenus
    Spry.Widget.MenuBar.prototype.initialize = function(listitem, element)
        var opentime, closetime;
        var link = listitem.getElementsByTagName('a')[0];
        var submenus = listitem.getElementsByTagName('ul');
        var menu = (submenus.length &gt; 0 ? submenus[0] : null);
        if(menu)
            this.addClassName(link, this.hasSubClass);
        if(!Spry.is.ie)
            // define a simple function that comes standard in IE to determine
            // if a node is within another node
            listitem.contains = function(testNode)
                // this refers to the list item
                if(testNode == null)
                    return false;
                if(testNode == this)
                    return true;
                else
                    return this.contains(testNode.parentNode);
        // need to save this for scope further down
        var self = this;
        this.addEventListener(listitem, 'mouseover', function(e){self.mouseOver(listitem, e);}, false);
        this.addEventListener(listitem, 'mouseout', function(e){if (self.enableKeyboardNavigation) self.clearSelection(); self.mouseOut(listitem, e);}, false);
        if (this.enableKeyboardNavigation)
            this.addEventListener(link, 'blur', function(e){self.onBlur(listitem);}, false);
            this.addEventListener(link, 'focus', function(e){self.keyFocus(listitem, e);}, false);
    Spry.Widget.MenuBar.prototype.keyFocus = function (listitem, e)
        this.lastOpen = listitem.getElementsByTagName('a')[0];
        this.addClassName(this.lastOpen, listitem.getElementsByTagName('ul').length &gt; 0 ? this.subHoverClass : this.hoverClass);
        this.hasFocus = true;
    Spry.Widget.MenuBar.prototype.onBlur = function (listitem)
        this.clearSelection(listitem);
    Spry.Widget.MenuBar.prototype.clearSelection = function(el){
        //search any intersection with the current open element
        if (!this.lastOpen)
            return;
        if (el)
            el = el.getElementsByTagName('a')[0];
            // check children
            var item = this.lastOpen;
            while (item != this.element)
                var tmp = el;
                while (tmp != this.element)
                    if (tmp == item)
                        return;
                    try{
                        tmp = tmp.parentNode;
                    }catch(err){break;}
                item = item.parentNode;
        var item = this.lastOpen;
        while (item != this.element)
            this.hideSubmenu(item.parentNode);
            var link = item.getElementsByTagName('a')[0];
            this.removeClassName(link, this.hoverClass);
            this.removeClassName(link, this.subHoverClass);
            item = item.parentNode;
        this.lastOpen = false;
    Spry.Widget.MenuBar.prototype.keyDown = function (e)
        if (!this.hasFocus)
            return;
        if (!this.lastOpen)
            this.hasFocus = false;
            return;
        var e = e|| event;
        var listitem = this.lastOpen.parentNode;
        var link = this.lastOpen;
        var submenus = listitem.getElementsByTagName('ul');
        var menu = (submenus.length &gt; 0 ? submenus[0] : null);
        var hasSubMenu = (menu) ? true : false;
        var opts = [listitem, menu, null, this.getSibling(listitem, 'previousSibling'), this.getSibling(listitem, 'nextSibling')];
        if (!opts[3])
            opts[2] = (listitem.parentNode.parentNode.nodeName.toLowerCase() == 'li')?listitem.parentNode.parentNode:null;
        var found = 0;
        switch (e.keyCode){
            case this.upKeyCode:
                found = this.getElementForKey(opts, 'y', 1);
                break;
            case this.downKeyCode:
                found = this.getElementForKey(opts, 'y', -1);
                break;
            case this.leftKeyCode:
                found = this.getElementForKey(opts, 'x', 1);
                break;
            case this.rightKeyCode:
                found = this.getElementForKey(opts, 'x', -1);
                break;
            case this.escKeyCode:
            case 9:
                this.clearSelection();
                this.hasFocus = false;
            default: return;
        switch (found)
            case 0: return;
            case 1:
                //subopts
                this.mouseOver(listitem, e);
                break;
            case 2:
                //parent
                this.mouseOut(opts[2], e);
                break;
            case 3:
            case 4:
                // left - right
                this.removeClassName(link, hasSubMenu ? this.subHoverClass : this.hoverClass);
                break;
        var link = opts[found].getElementsByTagName('a')[0];
        if (opts[found].nodeName.toLowerCase() == 'ul')
            opts[found] = opts[found].getElementsByTagName('li')[0];
        this.addClassName(link, opts[found].getElementsByTagName('ul').length &gt; 0 ? this.subHoverClass : this.hoverClass);
        this.lastOpen = link;
        opts[found].getElementsByTagName('a')[0].focus();
            //stop further event handling by the browser
        return Spry.Widget.MenuBar.stopPropagation(e);
    Spry.Widget.MenuBar.prototype.mouseOver = function (listitem, e)
        var link = listitem.getElementsByTagName('a')[0];
        var submenus = listitem.getElementsByTagName('ul');
        var menu = (submenus.length &gt; 0 ? submenus[0] : null);
        var hasSubMenu = (menu) ? true : false;
        if (this.enableKeyboardNavigation)
            this.clearSelection(listitem);
        if(this.bubbledTextEvent())
            // ignore bubbled text events
            return;
        if (listitem.closetime)
            clearTimeout(listitem.closetime);
        if(this.currMenu == listitem)
            this.currMenu = null;
        // move the focus too
        if (this.hasFocus)
            link.focus();
        // show menu highlighting
        this.addClassName(link, hasSubMenu ? this.subHoverClass : this.hoverClass);
        this.lastOpen = link;
        if(menu &amp;&amp; !this.hasClassName(menu, this.subHoverClass))
            var self = this;
            listitem.opentime = window.setTimeout(function(){self.showSubmenu(menu);}, this.showDelay);
    Spry.Widget.MenuBar.prototype.mouseOut = function (listitem, e)
        var link = listitem.getElementsByTagName('a')[0];
        var submenus = listitem.getElementsByTagName('ul');
        var menu = (submenus.length &gt; 0 ? submenus[0] : null);
        var hasSubMenu = (menu) ? true : false;
        if(this.bubbledTextEvent())
            // ignore bubbled text events
            return;
        var related = (typeof e.relatedTarget != 'undefined' ? e.relatedTarget : e.toElement);
        if(!listitem.contains(related))
            if (listitem.opentime)
                clearTimeout(listitem.opentime);
            this.currMenu = listitem;
            // remove menu highlighting
            this.removeClassName(link, hasSubMenu ? this.subHoverClass : this.hoverClass);
            if(menu)
                var self = this;
                listitem.closetime = window.setTimeout(function(){self.hideSubmenu(menu);}, this.hideDelay);
            if (this.hasFocus)
                link.blur();
    Spry.Widget.MenuBar.prototype.getSibling = function(element, sibling)
        var child = element[sibling];
        while (child &amp;&amp; child.nodeName.toLowerCase() !='li')
            child = child[sibling];
        return child;
    Spry.Widget.MenuBar.prototype.getElementForKey = function(els, prop, dir)
        var found = 0;
        var rect = Spry.Widget.MenuBar.getPosition;
        var ref = rect(els[found]);
        var hideSubmenu = false;
        //make the subelement visible to compute the position
        if (els[1] &amp;&amp; !this.hasClassName(els[1], this.MenuBarSubmenuVisible))
            els[1].style.visibility = 'hidden';
            this.showSubmenu(els[1]);
            hideSubmenu = true;
        var isVert = this.hasClassName(this.element, this.verticalClass);
        var hasParent = els[0].parentNode.parentNode.nodeName.toLowerCase() == 'li' ? true : false;
        for (var i = 1; i &lt; els.length; i++){
            //when navigating on the y axis in vertical menus, ignore children and parents
            if(prop=='y' &amp;&amp; isVert &amp;&amp; (i==1 || i==2))
                continue;
            //when navigationg on the x axis in the FIRST LEVEL of horizontal menus, ignore children and parents
            if(prop=='x' &amp;&amp; !isVert &amp;&amp; !hasParent &amp;&amp; (i==1 || i==2))
                continue;
            if (els[i])
                var tmp = rect(els[i]);
                if ( (dir * tmp[prop]) &lt; (dir * ref[prop]))
                    ref = tmp;
                    found = i;
        // hide back the submenu
        if (els[1] &amp;&amp; hideSubmenu){
            this.hideSubmenu(els[1]);
            els[1].style.visibility =  '';
        return found;
    Spry.Widget.MenuBar.camelize = function(str)
        if (str.indexOf('-') == -1){
            return str;   
        var oStringList = str.split('-');
        var isFirstEntry = true;
        var camelizedString = '';
        for(var i=0; i &lt; oStringList.length; i++)
            if(oStringList[i].length&gt;0)
                if(isFirstEntry)
                    camelizedString = oStringList[i];
                    isFirstEntry = false;
                else
                    var s = oStringList[i];
                    camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
        return camelizedString;
    Spry.Widget.MenuBar.getStyleProp = function(element, prop)
        var value;
        try
            if (element.style)
                value = element.style[Spry.Widget.MenuBar.camelize(prop)];
            if (!value)
                if (document.defaultView &amp;&amp; document.defaultView.getComputedStyle)
                    var css = document.defaultView.getComputedStyle(element, null);
                    value = css ? css.getPropertyValue(prop) : null;
                else if (element.currentStyle)
                        value = element.currentStyle[Spry.Widget.MenuBar.camelize(prop)];
        catch (e) {}
        return value == 'auto' ? null : value;
    Spry.Widget.MenuBar.getIntProp = function(element, prop)
        var a = parseInt(Spry.Widget.MenuBar.getStyleProp(element, prop),10);
        if (isNaN(a))
            return 0;
        return a;
    Spry.Widget.MenuBar.getPosition = function(el, doc)
        doc = doc || document;
        if (typeof(el) == 'string') {
            el = doc.getElementById(el);
        if (!el) {
            return false;
        if (el.parentNode === null || Spry.Widget.MenuBar.getStyleProp(el, 'display') == 'none') {
            //element must be visible to have a box
            return false;
        var ret = {x:0, y:0};
        var parent = null;
        var box;
        if (el.getBoundingClientRect) { // IE
            box = el.getBoundingClientRect();
            var scrollTop = doc.documentElement.scrollTop || doc.body.scrollTop;
            var scrollLeft = doc.documentElement.scrollLeft || doc.body.scrollLeft;
            ret.x = box.left + scrollLeft;
            ret.y = box.top + scrollTop;
        } else if (doc.getBoxObjectFor) { // gecko
            box = doc.getBoxObjectFor(el);
            ret.x = box.x;
            ret.y = box.y;
        } else { // safari/opera
            ret.x = el.offsetLeft;
            ret.y = el.offsetTop;
            parent = el.offsetParent;
            if (parent != el) {
                while (parent) {
                    ret.x += parent.offsetLeft;
                    ret.y += parent.offsetTop;
                    parent = parent.offsetParent;
            // opera &amp; (safari absolute) incorrectly account for body offsetTop
            if (Spry.is.opera || Spry.is.safari &amp;&amp; Spry.Widget.MenuBar.getStyleProp(el, 'position') == 'absolute')
                ret.y -= doc.body.offsetTop;
        if (el.parentNode)
                parent = el.parentNode;
        else
            parent = null;
        if (parent.nodeName){
            var cas = parent.nodeName.toUpperCase();
            while (parent &amp;&amp; cas != 'BODY' &amp;&amp; cas != 'HTML') {
                cas = parent.nodeName.toUpperCase();
                ret.x -= parent.scrollLeft;
                ret.y -= parent.scrollTop;
                if (parent.parentNode)
                    parent = parent.parentNode;
                else
                    parent = null;
        return ret;
    Spry.Widget.MenuBar.stopPropagation = function(ev)
        if (ev.stopPropagation)
            ev.stopPropagation();
        else
            ev.cancelBubble = true;
        if (ev.preventDefault)
            ev.preventDefault();
        else
            ev.returnValue = false;
    Spry.Widget.MenuBar.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
            if (ignoreUndefinedProps &amp;&amp; optionsObj[optionName] == undefined)
                continue;
            obj[optionName] = optionsObj[optionName];
    And last, here is the HTML code that has also not been modified in any way:
    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Untitled Document&lt;/title&gt;
    &lt;script src="../BXC Main Navigation Spry Drop Menu/SpryAssets/SpryMenuBar.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;link href="../BXC Main Navigation Spry Drop Menu/SpryAssets/SpryMenuBarHorizontal4.css" rel="stylesheet" type="text/css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;ul id="MenuBar1" class="MenuBarHorizontal"&gt;
      &lt;li&gt;&lt;a class="MenuBarItemSubmenu" href="#"&gt;Buy&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop from Private Owner&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop Direct from Stores&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Buying&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Bid&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop from Auction&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Bidding&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Trade&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop for Trades&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Trading&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a class="MenuBarItemSubmenu" href="#"&gt;List Items&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;List Items in Auction&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;List Items for Sale&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;List Items for Trade&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Listing Items&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Intro&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Flash Site &amp;amp; Intro&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;About Us&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;My Xchange&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Activity&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Account&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Mail&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Contact Us&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Help&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Main Help&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Site Map&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;script type="text/javascript"&gt;
    &lt;!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //--&gt;
    &lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    Thanks in advance for any of your help.
    Jose H.

    Hello Nancy,
    I was troubleshooting For the next 8 hours after my post here and eventually I got it right, I uploaded the files to the test server and at the time did not have the chance to post the solution here. This is why, as you saw, it is working correctly now.  Both the CSS and HTML files needed modifications. While working on the code I had to run IE8, Chrome and Firefox simultaneously and refresh all three after every change in the code because what would fix the problem in one would cause a problem for the other.
    In addition to the problems listed in my original post, there were also other graphical issues in IE8, such as; the main menu buttons without sub-menus would only display at half their size vertically. The border around the buttons would not display despite that the background images were rendered in Photoshop as flattened JPEGs with boarders as part of the background image. Being so, I removed all borders from the CSS script.
    By the way.. the IE8 security measure did pop up while working from the server.
    Anyhow for those of you who are experiencing similar problems you can take a look at the working code bellow and compare it to the initial code. I've included detail comments on every line I have changed, modified or added.
    Good luck.. as I know it can become a complicated task when creating custom Spry menus.
    <b>Here is the finished CSS script</b>
    <code>@charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 10;
        padding: 0;
        list-style-type: none;
        /* font size for top menu*/
        font-size: 80%;
        cursor: default;
        width: auto;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        text-align: center;
        /*whole menu moves*/
        margin-left: 100px;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* My Note --Top buttons' background, height and font size adjust-- */
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        /* My note --I added the height and background-image as Main-Buttons.jpg-- */
        height: 55px;   
        background-image: url(../Main-Buttons.jpg);
        margin: -2;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: center;
        /*text-align: left;*/
        cursor: pointer;
        width: 99px;
        float: left;
    /* My note --Submenu font size adjust-- */
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 87%;
        z-index: 1020;
        cursor: default;
        width: 160px;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        /* My note --this margin alligns the drop buttons up and down-- */
        margin-top: 0px;
        height: 25px;
        left: auto;
    /* My note --drop menu size adjustments-- */
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        height: 25px;
        width: 162px;
        /* New addition */
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position:absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        /*border: 1px solid #CCC;*/
    /* My note --Text Allignment global-- */
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        /*My note -- took out borders &amp; changed text color to #333(black)&amp; added my own mouse not over image-- */   
        /*border: 0px solid #333332;*/
        background-image: url(../Main-Buttons.jpg);
        /*height: 40px;*/
        text-align: center;   
        display: block;
        cursor: pointer;
        padding: 0.5em 0.75em;
        text-decoration: none;
        /*My note --Text Color-- */
        color: #333;        /*background-color: was #CCC;*/
        letter-spacing: -0.00px;
        margin-left: 1px;   
        margin-right: 0px;
        /*alligns text up or down globally*/
        margin-top: 1px;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        /* My note --took out all backgound &amp; text color for mouse over-- */
        /*background-color: #33C;
        color: #FFF;*/
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        /*My note -- took out background &amp; text &amp; added my own mouse over image-- */
        background-image: url(../Main-Buttons-mouse-over.jpg);
        /*background-color: #33C;
        color: #FFF;*/
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        /* My note --!!!!!This height setting adjusts the main buttons' background height in IE8!!!!-- */
        height: 40px;
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* My note --mouse over-- */
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f&#92;loat: left;
            /* My note --The backgound color below was changed here to the same color #3e6487 as the darkest tone in the background image graphic to mimic the original image borders; dark blue, since IE8 for some reason would cut them out. This change allows this dark blue background to display around the main top buttons in IE8 giving the appearance of borders*/
            background: #3e6487;
    </code>
    <b>Here is the modified HTML script</b>
    <code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Untitled Document&lt;/title&gt;
    &lt;script src="/SpryAssets/SpryMenuBar.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;link href="/SpryAssets/SpryMenuBarHorizontal4.css" rel="stylesheet" type="text/css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;ul id="MenuBar1" class="MenuBarHorizontal"&gt;
      &lt;li&gt;&lt;a class="MenuBarItemSubmenu" href="#"&gt;Buy&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop from Private Owner&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop Direct from Stores&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Buying&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Bid&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop from Auction&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Bidding&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Trade&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Shop for Trades&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Trading&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a class="MenuBarItemSubmenu" href="#"&gt;List Items&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;List Items in Auction&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;List Items for Sale&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;List Items for Trade&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Help Listing Items&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Intro&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Flash Site &amp;amp; Intro&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;About Us&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;My Xchange&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Activity&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Account&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Mail&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;!-- My note --the bellow line was: &lt;li&gt;&lt;a href="#"&gt;Contact Us&lt;/a&gt;&lt;/li&gt; --- changing it to: &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Contact Us&lt;/a&gt;     corrected the height of the Contact us button wich did not have sub menus and because of this only diplayed at half size vertically in IE8 //--&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Contact Us&lt;/a&gt;
      &lt;li&gt;&lt;a href="#" class="MenuBarItemSubmenu"&gt;Help&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Main Help&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Site Map&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;script type="text/javascript"&gt;
    &lt;!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //--&gt;
    &lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    </code>
    And Richard.. Thanks again for the time and your help, truly appreciated.
    Jose H.

  • Please help: Populating values in drop down list by onchange - javascript !

    I am working on a task - I need to populate drop down named "year" dynamically (from database) depending upon the select of an element from drop down list "carLine" . I am calling javascript funtion on onchange event of the html select and setting property of the selected element.The environment is Struts and dynaactionform is being used . Here is the my html select for both the drop down list s and javascript funtion to set value. The getYears method is defined in the locatoraction action class. But after doing all these carLine is not getting populated with the values corresponding to selected carline.
    Database side is working fine .
    <script type="text/javascript">
    function getYearsForCarline(){
    document.getElementById('method').value = 'getYears';
    document.forms[0].submit();
    alert("submitted");
    </script>
    <html:form styleId="locatorForm" action="/locator/locatorAction" method="post">
              <input type="hidden" name="method" value="getYears" />
              <tr>
                   <td align="center">
                   <table border="0" width="300" cellpadding="0" cellspacing="5">
                        <tr>
                             <td><span class="formLabelEM"><bean:message
                                  key="label.locator.carLine" />*</span>
                             <html:select styleId="carLineBox" property="carLine" onchange="javascript:getYearsForCarline()">
                                  <html:option value="">Select a Carline</html:option>
                                  <html:optionsCollection property="carLines" />
                             </html:select></td>
                        </tr>
                        <tr>
                             <td><span class="formLabelEM"><bean:message
                                  key="label.locator.modelYear" />*</span>
                             <html:select property="year" >
                             <html:option value="">Select Year</html:option>
                                  <html:optionsCollection property="years" />
    Any advise will be highly appreciated . Thanks in advance.

    Thanks both of you for the advise ! My code worked perfectly fine after adding separate action mapping for Year and using that as action in the form though the new action mapping point to the same action class locatorAction ..I still do not understand the reason behind this exactly(any suggestion are most welcome) but it works. Here is code for my action mapping :
    <action path="/locator/locatorYearAction" name="locatorForm"
                   input="/locator/locatorMain.jsp"
                   type="com.apps.sales.web.salesin.actions.LocatorAction"
                   parameter="method" validate="true">
                   <forward name="showCarlines" path="/locator/locatorMain.jsp"
                        redirect="false" />
                   <forward name="showModels" path="/locator/locatorModels.jsp"
                        redirect="false" />     
              </action>

  • Making drop down menu for entry fields in database

    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.math.*" %>
    <%@ page import="java.util.*" %>
    <%@ include file="/global/util.inc" %>
    <%@ include file="/global/user_session.jsp" %>
    <%@ include file="/global/connection_prepare_marketing.jsp" %>
    <html>
    <head>
    <title>Marketing Data Entry</title>
    <LINK REL=STYLESHEET HREF="/global/app_main.css">
    <BODY bgcolor=#FEFFE8>
    <%
    int     CID = 0;     
         CID = Integer.parseInt(request.getParameter("cid"));
    if (request.getParameter("delete") != null) {
         // Do the delete via a PreparedStatement
            java.sql.PreparedStatement ps = null;
         ps = db.prepareStatement("delete from hit_or_miss where hom_ID = ?");
         ps.setInt(1, CID);
         ps.executeUpdate();
         CID = 0;
         out.print ("<font color=darkblue>The record has been deleted successfully</font>");
    if (request.getParameter("update") != null) {
           // Set inputs in order to evaluate
            String          DE = request.getParameter("date_entered");
                   DE = DE.replaceAll("[a-zA-Z]","");             // Get rid of letters
         String          SI = request.getParameter("summit_ID");
                   SI = SI.replaceAll(",","");                 //Get rid of commas
         String          TT = request.getParameter("transaction_type");    //No change needed
           String            NL = request.getParameter("notional");
                     NL = NL.replaceAll("[a-zA-Z]","");               // Get rid of letters
                     NL = NL.replaceAll(",","");                  // Get rid of commas
           BigDecimal      NTL = new BigDecimal(NL);
         String          ST = request.getParameter("structure");
         String          CP = request.getParameter("counterparty");
         String          ED = request.getParameter("expiry_date");
                   ED = ED.replaceAll("[a-zA-Z]","");                // Get rid of letters
         String          SD = request.getParameter("start_date");
                   SD = SD.replaceAll("[a-zA-Z]","");                // Get rid of letters
         String          MD = request.getParameter("maturity_date");
                   MD = MD.replaceAll("[a-zA-Z]","");                // Get rid of letters
         String          CT = request.getParameter("currency_type");
         String          MRKTR = request.getParameter("marketer");
           String            SSC = request.getParameter("sales_credit");
                     SSC = SSC.replaceAll("[a-zA-Z]","");         // Get rid of letters
                     SSC = SSC.replaceAll(",","");                 // Get rid of commas
           BigDecimal      SC = new BigDecimal(SSC);
         String          MRKP = request.getParameter("markup");
                   MRKP = MRKP.replaceAll("[a-zA-Z]","");    // Get rid of letters
                   MRKP = MRKP.replaceAll(",","");           // Get rid of commas
         BigDecimal     MP = new BigDecimal(MRKP);
         String          CC = request.getParameter("comments_color");
      if (     SD != null && MD != null && ED != null ) {
         // First get the ID to use     
            String sql = " "+
              "begin "+
                "declare @new_id int "+
                 "if (select count(*) from hit_or_miss ) = 0 "+
                 "       begin "+
                 "       select @new_id = 1 "+
                 "       end   "+
                 "else "+
                 "       begin "+
                "       select @new_id = max(hom_ID) + 1 from hit_or_miss "+
                 "       end "+
              "select newID=@new_id "+
           "end";
         int nID = 0;
         rs = st.executeQuery(" "+ sql + " ");
         while (rs.next()) {
              nID = rs.getInt("newID");
         // Get timestamp for insert
         java.util.Date curr_dt = new java.util.Date();
            java.sql.Timestamp dt = new java.sql.Timestamp(curr_dt.getTime());
         // Now we check if it is an insert or update based on the passed ID
         if (CID == 0) {
              // Do the insert via a PreparedStatement
              java.sql.PreparedStatement ps = null;
              ps = db.prepareStatement("insert into hit_or_miss values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
              ps.setInt(1, nID);
              ps.setString(2, DE);
              ps.setString(3, SI);
              ps.setString(4, TT);
              ps.setBigDecimal(5, NTL);
              ps.setString(6, ST);
              ps.setString(7, CP);
              ps.setString(8, ED);
              ps.setString(9, SD);
              ps.setString(10, MD);
              ps.setString(11, CT);
              ps.setString(12, MRKTR);
              ps.setBigDecimal(13, SC);
              ps.setBigDecimal(14, MP);
              ps.setString(15, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>The new record has been inserted into the database successfully</font>");
         } else {
              // Do the update via a PreparedStatement
              // First we insert a row into the archive table
                 java.sql.PreparedStatement ps = null;
                    ps = db.prepareStatement("update hit_or_miss set date_entered = getdate(), summit_ID = ?, transaction_type = ?, notional = ?, structure = ?, counterparty = ?, expiry_date = ?, start_date = ?, maturity_date = ?, currency_type = ?, marketer = ?, sales_credit = ?, markup = ?, comments_color = ? where hom_ID ="+CID+" ");
              ps.setString(1, DE);
              ps.setString(2, SI);
              ps.setString(3, TT);
              ps.setBigDecimal(4, NTL);
              ps.setString(5, ST);
              ps.setString(6, CP);
              ps.setString(7, ED);
              ps.setString(8, SD);
              ps.setString(9, MD);
              ps.setString(10, CT);
              ps.setString(11, MRKTR);
              ps.setBigDecimal(12, SC);
              ps.setBigDecimal(13, MP);
              ps.setString(14, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>This record has been updated successfully</font>");
      } else {
         out.print("<font color=red>You must fill in the date and amount sections of this form in order the write to the database to occur - please try again</font>");
         String DateEntered_text = null;
         String SummitID_text = null;
         String TransactionType_text = null;
         String Amount_text = "0000000.00";
         String Structure_text = null;
         String Counterparty_text = null;
         String ExpiryDate_text = null;
         String StartDate_text = null;
         String MaturityDate_text = null;
         String CurrencyType_text = null;
         String Marketer_text = null;
         BigDecimal SalesCredit_text = new BigDecimal(0.0);
         BigDecimal Markup_text = new BigDecimal(0.0);
         String CommentsColor_text = null;
         String Notional_text = null;
    if (CID == 0) {
         String Expiry_Date_text = "";
            String Start_Date_text = "";
            String Maturity_Date_text = "";
    } else {
         rs = st.executeQuery("select o.hom_ID, DateEntered=convert(varchar(10),o.date_entered,101), o.summit_ID, o.transaction_type, Notional=convert(varchar(100),convert(money,o.notional),1), o.structure, o.counterparty, ExpiryDate=convert(varchar(10),o.expiry_date,101), StartDate=convert(varchar(10),o.start_date,101), MaturityDate=convert(varchar(10),o.maturity_date,101), o.currency_type, o.marketer, o.sales_credit, o.markup, o.comments_color from hit_or_miss o where o.hom_ID =  "+CID+ " ");
         while (rs.next()) {
              DateEntered_text = rs.getString("DateEntered");
              SummitID_text = rs.getString("summit_ID");
              TransactionType_text = rs.getString("transaction_type");          
              Amount_text = rs.getString("Notional");
              Structure_text = rs.getString("structure");
              Counterparty_text = rs.getString("counterparty");
              ExpiryDate_text = rs.getString("ExpiryDate");
              StartDate_text = rs.getString("StartDate");
              MaturityDate_text = rs.getString("MaturityDate");
              CurrencyType_text = rs.getString("currency_type");
              Marketer_text = rs.getString("marketer");
              SalesCredit_text = rs.getBigDecimal("sales_credit",8);
              Markup_text = rs.getBigDecimal("markup",5);
              CommentsColor_text = rs.getString("comments_color");
    %>
    <table id="main" border=0 cellspacing="4" cellpadding=3 bgcolor="buttonface">
         <tr><td ><form name="myform" method="post" action="/applications/marketing/hit_or_miss.jsp">
    <table  border="0" cellspacing="4" cellpadding="3">
         <tr class=tableHeader>
              <td valign=top colspan=2 >Marketing Form</td>
         </tr>
         <tr>
              <td valign=top><font size="-1"><b>Date Entered:</b></font></td>
              <td>     
                   <input type=text name=date_entered size=8 value='<%=DateEntered_text%>'>
                   <a href="javascript: void(0);"
                   onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                   onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                   onclick="g_Calendar.show(event, 'myform.date_entered', false, 'mm/dd/yyyy'); return false;">
                   <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
              </td>
         </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Summit ID:</b> </font></td>
                    <td><input type=text name=summit_ID size=25 value='<%=SummitID_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Transaction Type:</b> </font></td>
                    <td><input type=text name=transaction_type size=25 value='<%=TransactionType_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Notional:</b> </font></td>
                    <td><input type=text name=notional size=25 value='<%=Notional_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Structure:</b> </font></td>
                    <td><input type=text name=structure size=25 value='<%=Structure_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Counterparty:</b> </font></td>
                    <td><input type=text name=counterparty size=25 value='<%=Counterparty_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Expiry Date:</b></font></td>
                    <td>   
                            <input type=text name=expiry_date size=8 value='<%=ExpiryDate_text%>'>
                            <a href="javascript: void(0);"
                            onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                            onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                            onclick="g_Calendar.show(event, 'myform.expiry_date', false, 'mm/dd/yyyy'); return false;">
                            <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
                    </td>  
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Start Date:</b></font></td>
                    <td>   
                            <input type=text name=start_date size=8 value='<%=StartDate_text%>'>
                            <a href="javascript: void(0);"
                            onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                            onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                            onclick="g_Calendar.show(event, 'myform.start_date', false, 'mm/dd/yyyy'); return false;">
                            <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
                    </td>  
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Maturity Date:</b></font></td>
                    <td>   
                            <input type=text name=maturity_date size=8 value='<%=MaturityDate_text%>'>
                            <a href="javascript: void(0);"
                            onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                            onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                            onclick="g_Calendar.show(event, 'myform.maturity_date', false, 'mm/dd/yyyy'); return false;">
                            <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
                    </td>  
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Currency Type:</b> </font></td>
                    <td><input type=text name=currency_type size=25 value='<%=CurrencyType_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Marketer:</b> </font></td>
                    <td><input type=text name=marketer size=25 value='<%=Marketer_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Sales Credit:</b> </font></td>
                    <td><input type=text name=sales_credit size=8 value='<%=SalesCredit_text%>'><b>%</b></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Markup:</b> </font></td>
                    <td><input type=text name=markup size=8 value='<%=Markup_text%>'><b>%</b></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Comments/Color:</b> </font></td>
                    <td><input type=text name=comments_color size=8 value='<%=CommentsColor_text%>'><b>%</b></td>
            </tr>
         <tr>
              <td colspan=2><hr width=100%></td>
         </tr>
         <tr>
              <td colspan=2>     <input type="submit" name="update" value="Update Record"
                        style='width:100px;font:9px verdana;'>
         <% if (CID != 0) { %>
                            <input type="submit" name="delete" value="Delete Record"
                                    onclick="return confirm('Are you sure you want to delete this record?');"
                                    style='width:100px;font:9px verdana;'>
            <% } %>
                   <input type="button" name="close" value="Close Window"
                        style='width:100px;font:9px verdana;'
                   onclick='javascript:window.close();'>
              </td>
         </tr>
    </table>
    </td>
    </tr>
    </table>
    <input type=hidden name=login_id value=<%= request.getParameter("login_id") %>>
    <input type=hidden name=cid value=<%=CID%>>
    <SCRIPT LANGUAGE="JavaScript">
    opener.myform.submit();
    </SCRIPT>
    </form>
    </body>
    </html>thats my code for part of database, in the parts that go "if CID = 0", thats the new record field, in there right now i just have users put in info into blank input fields, however, i would like to know if i can make certain fields, like Mraketer, and Counterparty fields to have drop down menus, Anyone know??

    So basically the main focus of what I was askin is in this block of code below:
    if (CID == 0) {
              // Do the insert via a PreparedStatement
              java.sql.PreparedStatement ps = null;
              ps = db.prepareStatement("insert into hit_or_miss values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
              ps.setInt(1, nID);
              ps.setString(2, DE);
              ps.setString(3, SI);
              ps.setString(4, TT);
              ps.setBigDecimal(5, NTL);
              ps.setString(6, ST);
              ps.setString(7, CP);
              ps.setString(8, ED);
              ps.setString(9, SD);
              ps.setString(10, MD);
              ps.setString(11, CT);
              ps.setString(12, MRKTR);
              ps.setBigDecimal(13, SC);
              ps.setBigDecimal(14, MP);
              ps.setString(15, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>The new record has been inserted into the database successfully</font>");
         } else {
              // Do the update via a PreparedStatement
              // First we insert a row into the archive table
                 java.sql.PreparedStatement ps = null;
                    ps = db.prepareStatement("update hit_or_miss set date_entered = getdate(), summit_ID = ?, transaction_type = ?, notional = ?, structure = ?, counterparty = ?, expiry_date = ?, start_date = ?, maturity_date = ?, currency_type = ?, marketer = ?, sales_credit = ?, markup = ?, comments_color = ? where hom_ID ="+CID+" ");
              ps.setString(1, DE);
              ps.setString(2, SI);
              ps.setString(3, TT);
              ps.setBigDecimal(4, NTL);
              ps.setString(5, ST);
              ps.setString(6, CP);
              ps.setString(7, ED);
              ps.setString(8, SD);
              ps.setString(9, MD);
              ps.setString(10, CT);
              ps.setString(11, MRKTR);
              ps.setBigDecimal(12, SC);
              ps.setBigDecimal(13, MP);
              ps.setString(14, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>This record has been updated successfully</font>");
         }     when CID = 0, what it does is it pops up a new window called "New Record" and in this new window, there are boxes where inputs can be made, so that when u hit submit, it submits into the database.
    What I want to do is, for example, there is a input field called "Marketer" where one can type in his own name as the Marketer, I want make this into a drop down box, where you can pick the marketer, and not have to type it in.
    You know how websies have New User, where you create a new user that is added to their database, and usually the COUNTRY field is a drop down menu where you pick the country from. I would like to do that to my database, and this is the area, or the code, that deal w/ new record "IF CID =0" and edit record "ELSE"
    Is this possible?
    Thanks in Advance

Maybe you are looking for

  • 8.0.6-119 on S160 can no longer see past the second access policy

    We upgraded an S160 to 8.0.6-119 today and now the appliance is not authenticating groups beyond restricted internet and information technology.  For example Access Policy #6 is called Marketing.  It has access to Streaming Media and Social Media (li

  • How to get full URL in java?

    Hi, I am working in a spring & hibernate project. For the AJAX request to bookmark, I used RSH (Really Simple Framework) framework. So, my URL changes for the AJAX request as http://localhost:8080/courses#/medicaltranscription/cardiology If I bookmar

  • Years of frustration, still no closer to finding or renaming catalog

    If you can help me it will be a monumental help with a task that has failed over and over again, mostly because of the complexity. Problem: I want to rename my catalog file and have it open as the default file. It somehow got a new name while I tried

  • Posting data source name using url

    Hi! Is it possible to send different data source for report than the default one when i call report using url link?

  • How to search among open tabs

    If someone knows, please tell me how to search among open tabs, as shown in the picture at URL http://users.hszk.bme.hu/~gt939/how_to_reach_this.jpg Thanks