Making drop down menus in server side includes

Can drop down menus be part of a server side include? If not,
how do I have drop down menus in my pages without copying the code
to all the pages individually?
I am working in Dreamweaver 8 on a Mac. I've made the drop
down menus using the behaviors window. Everything is fine in the
original html file. When I use the file as an include in my main
page, the javascript drop downs do not work. I have the style sheet
used in the drop down file attached to the main page. What do I
need to do with the main page to have the drop down menu work? I
need to use this drop down on the majority of my pages. Thanks!
Note: I've taken out the extra code in the include file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" /> <title>Untitled
Document</title></head><body></body></html>

> Can drop down menus be part of a server side include?
Sure - it's the only way I do them.
> I've made the drop down menus using the behaviors window
That's too bad. You will want to read this -
http://www.losingfight.com/blog/2006/08/11/the-sordid-tale-of-mm_menufw_menujs/
There are MUCH better ways -
Check the uberlink and MacFly tutorials at PVII -
http://www.projectseven.com/
and the Navbar tutorial/articles at Thierry's place
http://tjkdesign.com/articles/dropdown/
Or this one (more recent article):
http://tjkdesign.com/articles/Pure_CSS_Dropdown_Menus.asp
Or to get it done fast, go here -
http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"aacjp" <[email protected]> wrote in message
news:[email protected]...
> Can drop down menus be part of a server side include? If
not, how do I
> have
> drop down menus in my pages without copying the code to
all the pages
> individually?
>
> I am working in Dreamweaver 8 on a Mac. I've made the
drop down menus
> using
> the behaviors window. Everything is fine in the original
html file. When I
> use
> the file as an include in my main page, the javascript
drop downs do not
> work.
> I have the style sheet used in the drop down file
attached to the main
> page.
> What do I need to do with the main page to have the drop
down menu work? I
> need
> to use this drop down on the majority of my pages.
Thanks!
>
> Note: I've taken out the extra code in the include file
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
> xmlns="
http://www.w3.org/1999/xhtml">
<head> <meta
> http-equiv="Content-Type"
> content="text/html; charset=ISO-8859-1" />
<title>Untitled
>
Document</title></head><body></body></html>
>
>

Similar Messages

  • My Drop Down Menus Do Not Work Properly in IE

    Hey. I'm really stuck and have been for over a week. Let me preface this by telling you I didn't build our website and have little knowledge of spry and spry assets. I can't the get the gentleman that built our site to help and I'm desperate!
    The site - www.ncsoccer.org , has drop down menus. They work fine in Chrome, FF and Live Preview (DW CS4). But in IE8, they do not.
    I had to revise the drop downs (changing names and removing some drop downs - I've done this with no problem before). When I uploaded the index page and the template pages, the error started.
    In addition, the people in my office that use Contribute to update their sections, cannot access anything but our index page and I don't know what (if anything) I've done wrong, as everything worked fine before the menu revision.
    I'm including the 'sprymenubarhorizontal.css" code below. Maybe you can see something that isn't right.
    Thanks for any insight or suggestions. Remember, asking me to create to create sprys or widgets or something like that may be over my head! Try to dumb it down for me!
    Thanks.
    Mark
    (sprymenubarhorizontal.css code)
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */
    /* 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: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    cursor: default;
    width: auto;
    /* 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;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: auto;
    float: left;
    /* 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: 100%;
    z-index: 1020;
    cursor: default;
    width: 15em;
    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
    left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 15em;
    /* 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;
    width: auto;
    background-attachment: fixed;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #ffffff;
    padding: 0.3em 0.75em;
    color: #000;
    text-decoration: none;
    /* 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: #cccccc;
    color: #000;
    /* 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-color: #cccccc;
    color: #000;
    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-image:  url("SpryMenuBarRight.gif");
    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%;
    /* 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-image:  url("SpryMenuBarRightHover.gif");
    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;
    /* 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\loat: left;
              background: #FFF;

    A;though the CSS is very well documented, there are those that ignore those signs. Look at the following
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
    The rest have been given a width of 15em, so this value may be a good start.
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
       width: auto;
        background-attachment: fixed;
    Just keep the border property and remove the other two.
    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;
    /* 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\loat: left;
              background: #FFF;
    The following is the original for the above
    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\loat: left;
            background: #FFF;
    Cheers,
    Gramps

  • Server Side Includes and Divs

    I have a template (dwt) for my site with editable regions for
    menus. I want to use Server Side Includes for the menu, as not all
    the pages will have the same menu.
    I have designed the site template (and pages) with css and
    divs. The area for the SSI is a div of size 145x335. The menu which
    I want to put inside this div will be a div based menu. I havent
    had any luck displaying the Div from the SSI yet. I have been
    looking on Google for help, but not much luck. I can get the Div to
    appear but the formatting doesnt show up.
    Im putting the SSI code in where I want it on the page, but
    im not sure exactly which code to get rid of in the shtml file. I
    know I need to remove body, head parts etc
    My site template uses CSS stored on the document, not an
    external css file.
    Any ideas?

    > Im sure Ive not got it right yet!! My head wont work
    lately!
    Yes. It's not working well here, either.
    Create your template with the editable region. In it, have
    links to a) the
    general stylesheet for all the pages, and b) the general
    stylesheet for all
    of the includes (these don't really need to be separate
    files). Spawn a
    child page, drop in the desired include, and save that page
    as
    whocares.shtml.
    That's it....
    The incude files themselves can be names anything you want -
    I like the
    'monkeybutt' extension, e.g.,
    yourinclude.monkeybutt
    The include files can make reference to CSS selectors, but
    cannot have
    embedded CSS rules, or links to external CSS files.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "~Billy~" <[email protected]> wrote in
    message
    news:eq234v$eq6$[email protected]..
    > Ive made myself confused now! I need it spelling out to
    me!
    >
    > Ok, a template file (dwt) with its css as an external
    style sheet.
    >
    > Rest of the sites pages made from the template file.
    >
    > Next, the template has one editable region for a choce
    of 2 div based
    > menus to
    > be placed into. Place either of these div menus into the
    template editable
    > region by creating two seperate SHTML files - one for
    each menu with the
    > body/head removed(and with internal or external css?)
    >
    > Next put the SSI code into the body of the template
    where I want the SSI
    > to
    > appear.
    >
    > Im sure Ive not got it right yet!! My head wont work
    lately!
    >

  • Drop down menus disappear in a blink of an eye. If I open more than 10 tabs I can't get to them, the arrow takes me back to the first 10. Only in FF, IE works fine. Tried safe mode and no change. It was fine one day and then not the next?

    drop down menus don't work...they disappear in a blink of an eye. This only happens in FF not IE? That includes the menu below! I can't have more than 10 tabs open because the arrow won't take me past 10 it just returns to the first 10???

    Did you ever figure this out? I bought my iPad last week to use in my business as well. I assume you are trying to use alldata? That is where I noticed this same issue. I had problems with identifix working with safari but downloaded a different browser and that works fine. Alldata does not work with either browser. The main difference is that on identifix if there is only one engine selection, it automatically selects the only option and continues to the home page. With alldata you have to make the selection manually even if there is only one option. Honestly if I can't get this to work I am going to return the iPad as it looses a significant amount of usefulness to men

  • Right-click, drop-down menus in Firefox 15 cause entire Mac OS 10.7.4 system to hang, forcing manual reboot.

    I bought a new MacBook Pro.
    I am running Mac OS 10.7.4 with Firefox 15. Every time I right click or try to use a drop-down menu in Firefox, it causes the entire system to hang, forcing a manual reboot.
    No crash reports are available as the Firefox does not actually crash.
    I have tried
    1.) Starting Firefox in safe mode
    2.) Disabling all the add-ons
    3.) Resetting Firefox
    4.) Removing and re-installing Firefox
    5.) Disabling hardware acceleration
    The problem still occurs.
    This is critical a critical issue as I have been using Firefox's Zotero plugin to write my PhD dissertation which is about 50% complete and now I cannot use Firefox or the Zotero plugin and have about 800 references I do not want to have to manually re-enter!! Also it is preventing me from continuing work on the dissertation as I am unable to insert references, and I have submit this thing by March!!!!

    Ok, further developments. Still can't get Firefox to work; it makes Lion hang and I have to force a reboot. I tried using terminal to open FF's profile manager, delete my old profile and make a new one. Same problem.
    I tried making a new user account in Mac OS, and doing another fresh install of Firefox. It worked! I was able to use drop down menus and right click without crashing the system!
    However, as soon as I installed the Zotero plugin... the same issue started occurring again.
    Dear programmers, please help me. It will literally take me weeks of work to re-do all of my citations using a different software or manually. There must be a way to fix this problem!

  • DW-MX-04 Drop-down menus won't work.

    I'm using Dreamweaver MX 2004 (have been for several years, so I know my way around it).  I want to create drop-down or fly-outs menu's to consolidate page links into categores in order to reduce the number of link tabs I have on each page.  I've been able to create the menu's I needed (using: Tag Chooser\ Behaviors\ Show Pop-U Menu), but when I preview the pages in IE, the text only shows on the mouseover text (not on top) despite having the text color set as black in the Menu window.  But it gets worse.  When I uploaded the page to try it, the drop down menus don't show up at all when I hover over the main buttons and  I get javascript errors.
    Can anyone give me so assistance on how to resolve this?
    I've checked the text color issue using the code view editing pane, and it matches the way I have it setup in the Pop-Up Menu.  But that's the least of my worries if I can't get them to work at all when the pages are live.
    Thanks...JEB

    MX2004 software is also somewhat antiquated and no longer supported by Adobe.   So it shouldn't surprise you that the tools from nearly a decade ago are obsolete today.  The web itself has changed significantly since 2004! 
    Web standards have moved from HTML3 to HTML5.  Layouts have departed from old school nested tables to more efficient CSS.  Unlike a decade ago, today's web devices include everything from hand held smartphones & tablets to laptops, desktops and TV displays.  So it's not possible to stand still and keep pace with the evolving web.  If you're not moving forward, you're falling behind.
    CSS is not an extension.  HTML = content.  CSS = Cascading Style Sheets.  CSS is used to style your content.    With CSS you can make an ordinary list look like a very cool menu with buttons, borders, shadows, drop-down and rollover effects.  If you master CSS, you can do some very creative things with it.  However, coding skills are essential.
    Below is an example of an unordered list styled with CSS to make a nice horizontal drop-menu.
    http://alt-web.com/DEMOS/CSS-Multi-colored-drop-menu.shtml
    To further illustrate the efficiency and power of CSS, look at CSS Zen Garden. 
    http://www.csszengarden.com/
    Every page on the right panel contains exactly the same HTML code as the first.  The only difference is the CSS code.
    The shift to CSS is intended to help web designers keep styles separate from content. Learning to work with CSS will make a you better web designer and save countless hours of tedious re-coding when you decide to change the look of your site.  It's much easier to edit one file instead of many. 
    Below are some links to help you learn more about how to work with CSS.
    HTML & CSS Tutorials -
    http://www.html.net/
    http://w3schools.com/
    http://www.csstutorial.net/
    https://tutsplus.com/2013/03/the-modern-web-designer/
    Have fun!
    Nancy O.

  • Drop down menus in IE

    Ah crud, I have been putting together this site for the
    Archdiocese of Omaha (
    http://www.archomaha.com/archdioceseofomaha/),
    and they decided to go with some drop down menus, thus making my
    life easier (sarcasm). After looking online at many a sources to
    try to find out about drop down menus, I found that it be easiest
    to purchase already made drop downs from projectseven.com. I have
    the drop downs working pretty much how I want them to work in
    firefox, but in IE, I am having some difficulties. The About Us
    dropdown link is behind part of my shadow image and the page
    content goes ahead of my other drop down links. How do I get the
    drop downs in IE above the other content? If you have trouble
    seeing my css or anything, please let me know and I will post
    it.

    You might get more help from the pii news group if you post
    it over there.
    Dave
    "bamgraphic" <[email protected]> wrote in
    message
    news:em9l0f$m4v$[email protected]..
    > Ah crud, I have been putting together this site for the
    Archdiocese of
    Omaha
    > (
    http://www.archomaha.com/archdioceseofomaha/),
    and they decided to go
    with
    > some drop down menus, thus making my life easier
    (sarcasm). After looking
    > online at many a sources to try to find out about drop
    down menus, I found
    that
    > it be easiest to purchase already made drop downs from
    projectseven.com.
    I
    > have the drop downs working pretty much how I want them
    to work in
    firefox, but
    > in IE, I am having some difficulties. The About Us
    dropdown link is
    behind
    > part of my shadow image and the page content goes ahead
    of my other drop
    down
    > links. How do I get the drop downs in IE above the other
    content? If you
    have
    > trouble seeing my css or anything, please let me know
    and I will post it.
    >

  • Server-side includes not working

    Running CF9.x on Apache 2.2 Win 7.
    I inherited an older html multiple page site that we are breaking down into includes using html server-side includes:
    e.g. <!--#include file="includes/sidebar.html" -->,  and saving the page as a .html file, which is then <cfincluded> in a .cfm file.
    Is there a way to get <!--#include file="includes/sidebar.html" --> include working on a CF page? All I see is the contents of the page, but none of the sidebar.html, or header.html, etc.
    I know I could switch to cfincludes, but the boss LOVES to muck around with the html side of things.
    TIA,
    Doug

    I know I could switch to cfincludes, but the boss LOVES to muck around with the html side of things.
    All the more reason to do it, surely?
    But anyway...
    I've never used a server-side include, but it looks to me that they just load the file and return it at that position in the document.
    For CF code to be executed, the file needs to be REQUESTED, so it won't be a starter with server-side includes.
    Adam

  • Server-side includes in css

    I am trying to incorporate server-side includes for my nav.
    links. I created the website using css. I am able to preview the
    navigationals (with proper links when I hovered) with F12 iexlorer,
    but when I upload everything and view it from IE, Mozilla, etc.
    they aren't there. My left nav. is totally blank.
    I am very new to web making and learned what I could from
    internet sites. Here are examples of my ssi code:
    My index page has a php extension (index.php) and has this
    inserted for the include:
    <?php include("menu.html");?>
    menu.html looks like:
    <ul>
    <li><a href="index.php">Home</a></li>
    <li><a href="searchplans.php">Search Plans
    </a></li>
    <li><a href="modifydesign.php">Modify
    Design</a></li>
    <li><a href="designpricing.php">Design
    Pricing</a></li>
    <li><a href="purchaseplan.php">Purchase
    Plan</a></li>
    <li><a href="contactus.php">Contact
    Us</a></li>
    </ul>
    I know that my server supports ssi, because I previously
    created a very basic site (not using css) using shtm extensions and
    an includes folder. When I called them they said that they support
    php too, but thought it was a problem with my settings in
    Dreamweaver.
    If you have any advice, I would be very grateful. I am
    banging my head on this one.

    Be sure to upload menu.html to your server.
    HTH,
    Randy
    > <?php include("menu.html");?>

  • Drop down menus not working in IE7

    My devolper created a template for me using the Spry Menu Bar.
    Everything is great, except in IE7, where the submenus drop down underneath the content below.
    Here is the page:
    http://test.swellinfo.com
    If you pull this up in IE7, using IE tester, you will not be able to see the drop down menus... They are coming down, but are just hidden underneath.
    Any help, is so greatly appreciated!
    Thank you,

    This actually did work... But, I have figured out that the issue is really in IE7... and for whatever reason the code was making IE8 go into compatability mode (essentially using IE7).     

  • None of the drop down menus work they r highlighted gray so I can't access them got the latest updates running lion. 10.7.2 all software is up to date

    Just updated everything but when I open iTunes all my drop down menus are gray and I can't selecte them. To close out iTunes I have to use command option esc and force quit because all drop down menus and shaded gray and I can't access them

    1 - the sudden disappearance of my 22 mailboxes, used to sort the emails that I need to file for future use
    That was most likely the result of some kind of corruption, as I've already said, not a bug in Mail.  Have you repaired the hard drive with Disk Utility recently?  That wouldn't be a bad idea.
    2 - at random times, mail (or the server) says that my password is incorrect and I must reenter (fix:  usually I can quit mail, restart, and the connection is restored without reentering my password)
    This is a known issue, where a failure to respond promptly on the server's end mimics what happens when the password is rejected.  There's no need to quit Mail, just cancel when asked to enter the password, take the account back online and try again.
    3 - mail seems to resort the mail in my mailboxes at random time.  Several times a day, I must reset the sort to (a) by date; (b) by desending
    Never seen that before.  That points more to some kind of possible corruption in your Mail data or preference files.

  • 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

  • Drop down menus and image loading

    Hi there,
    I have an idea on my site to display photos for consumers to purchase. What I have is 2 drop down menus, the first one has a list of the galleries, the second has a list of the photos. When you select a gallery a corresponding list of photos for that gallery appears in the second drop down menu. That part I've got under control. After that, the user is supposed to press a "Check Picture" button and the picture they have selected is supposed to come up in another small window so they can double check that they the photo they want is the one they are ordering. Firstly I wanted the photo to appear in an applet that I had at the top of the screen but that seemed WAY too difficult so I decided on just having it load up in a new window scaled down to just fit the pic.
    The code for the "Check Picture" button is this:
    <input type="button" name="Button1" value="Check Picture" onclick="WinOpen()">
    but I'm having trouble with the WinOpen() function.
    Because of the two drop down menus I've had to put this code in:
    var groups=document.doublecombo.example.options.length
    var group=new Array(groups)
    for (i=0; i<groups; i++)
    group=new Array()
    group[0][0]=new Option("-Select A Picture-")
    group[0][1]=new Option("")
    group[0][2]=new Option("")
    group[1][0]=new Option("Barrel Shed","photos/gallery1/barrelshed.jpg")
    group[1][1]=new Option("Cafe Jojo","photos/gallery1/cafejojo.jpg")
    group[1][2]=new Option("Close Up","../photos/gallery1/closeup.jpg")
    ...that I got from a tutorial (but of course I don't really understand it.)
    Is there a way that in the WinOpen function I can have something like...
    window.open("../photos/gallery1/"PicValue".jpg","DisplayImage","menubar=no");
    and then down with the options part I can include a value that corresponds to each picture.
    ...or am I going in the completely wrong direction and there is a much easier way that somebody knows of.
    Any help would be greatly appreciated.
    Regards
    Peter

    Not too sure as this is a JavaScript question but I'll give it a shot.
    You should try to get the value (which appears to contain a URL) from the second drop-down form element. Not sure what it's called but if you look at the second select element it should have a name associated with it (I've assumed it's called example2).
    url = document.doublecombo.example2.value;
    window.open(url, "Display Image", "menubar=no");But as I said, I'm not sure.

  • Drop-down menus wig out, have to type backwards in address bar, etc.

    When opening firefox, I noticed that my bookmarks were missing. I went to the drop-down menu to select view and the screen started scrolling all of the drop-down menus. I then moved onto the address bar and the cursor started moving to the beginning of the bar. When I typed in my address info, it would put the next letter in front of the last letter making my text enter in backwards from what I was typing.
    My first thought is I have a virus, but my pc is protected. Firefox is the only program being affected. I can use IE explorere, but that is taking a step backwards in my opinion. I need this fixed asap. Help!!!

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    See also http://kb.mozillazine.org/Locked_or_damaged_places.sqlite
    You can create a new profile as a test to check if your current profile is causing the problems.<br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)<br />
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Drop Down Menus on different browsers

    Hi. I am a teacher and I'm making a website for my school. I just learned how to create drop down menus using html code. I checked the website on Firefox, Safari, and even Opera. Everything looks great, except for Internet Explorer. The menu at the top looks totally funky! It's in the wrong direction, the pictures are missing, etc. In addition, other things look messed up as well. Please check it out...
    http://nestleweb.com
    Why is this happening? I know that many people use IE, so it has to look right on this browser. Any suggestions?

    I did the same thing. I provided links on the homepage so users would not use IE. But the problem is... once a user goes to IE and sees the menus and the page all messed up, he/she might just give up and not even scroll to the bottom to see the browser recommendations. I just received an email telling me that the website was messed up for a visitor.
    Just venting...I am a teacher that's making the school website. Now, in my own classroom, I can tell and train my students and parents to use FF, but it's out of my control for the rest of the school and any other visitors. I'm just frustrated with the situation because everything takes so much time to make and then it looks horrible on IE! Thanks for your post. It helps to know I'm not the only one!

Maybe you are looking for

  • Can't Restore Gen 1 iPod Touch - Serial Number n/a and Unknown Error 1

    I had just bought a Gen 1 iPod Touch off of eBay. It is said to be fully functional and was restored to factory settings. It also appears to be in great shape (just as it was claimed to be). When I plugged it to my PC and it said, "iTunes has detecte

  • Help with a while loop condition

    I'm trying to write to a File. I ask the user for input, then I enter a while loop and test the condition. The loop works, but it won't stop. I've tried everything. Here is my code please help!! thanks inputline = keyboard.readLine();//read the keybo

  • Got a white screen with flashing file icon

    Why do I have a white screen with flashing file icon with question mark inside?

  • Can't connect ad-hoc network after IOS 8.2 update

    Hi, This is my first post on Apple Discussion so please ignore grammatically and other mistakes if i made. I am using iPhone 5S 32 GB factory unlocked and working very well in INDIAN network.  I use to connect ad-hoc network created on my Window 7 De

  • D51wkdmp::::Trying to run on corrupt file, ""workbook.Item dependency

    Hi ALL I am trying to run that following dump utility on my corrupt DIS File, I am not successful , but if run that following command on my correct file (Working File) it gives me the result. d51wkdmp "C:\XX DISCOVERER REPORT.DIS" c:\PA_EXP_DUMP.TXT