How to use a Spry Menu as a Library item?

Okay, this is my second post; but, with a different title.
I made a Spry menu for my Home Page. I saved it and a logo
together as a library item and placed the library item on a second
page. The links in the menu work when there is no style sheet
attached for the Spry meny and the menu appears just as text; but,
as soon as the .css style sheet for the menu is attached to the
second page, the menu appears correct except the drop down menus do
not work. I tried adding a link to the Spry Java Script file as it
is on the home page; still no luck.
I tried the same with a test file, which I have since
removed, stored at the same folder as the home page; same problem.
How are we suposed to make a workable library item with a
Spry Menu? Surely this is possible, no?
Here are the two pages I am referring to:
Good Page:
http://iculver.com/
Bad Page:
http://iculver.com/pages/AboutUs/Personal_info.html

Apologies - my mistake. You are correct, and my instructions
were
incomplete. That other bit is required too.
> Now, I thought (probably in error) that items after !--
were comments, but
> it
> seems to be required, too. I tried eliminating taht part
and the menus did
> not
> work. I need all of this last part.
The comments 'hide' the scripting from validators and older
browsers, but
it's still recognized as javascript, since the comments occur
INSIDE a
<script> tag.
> these Spry Menus in Libraries easier to use...)
It's not so hard once you get all the pieces together.
1. Create the library item as described.
2. Make sure that each page that is to carry this library
item has the
required links in the head (to the CSS and the js files), AND
in the body.
Why not use a template instead? That way, all of these links
are managed
for you.
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
==================
"JustBob" <[email protected]> wrote in
message
news:[email protected]...
> Hummm...
>
> Now, don't yell at me, okay? I'm a goLive switcher and
really a graphic
> designer, not a coder...
>
> So, It seems from the above message that I am to
establish the links to
> the
> script and the css file before inserting the library
item. But, either
> way,
> that didn;t do the trick for me. I did find a bit of
code in one of the
> pages
> that seems to be required.
>
> It seems I also need to insert this just before the
close of the body tag:
>
> <script type="text/javascript">
> <!--
> var MenuBar1 = new Spry.Widget.MenuBar("MenuBar",
> {imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
> imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
> //-->
> </script>
>
> Now, I thought (probably in error) that items after !--
were comments, but
> it
> seems to be required, too. I tried eliminating taht part
and the menus did
> not
> work. I need all of this last part.
>
> I'm sorry I'm such a dope. I probably did something
funny when I was
> styling
> the menu. (I do hope Adobe can accommodate dopes lime
me, though, and make
> these Spry Menus in Libraries easier to use...)
>
> Thanks for all of your help! Really!
>

Similar Messages

  • How to align the spry menu pannel in dreamweaver cs4

    Can someone tell me how to align the spry menu pannel either left, center, are right in a div tag? I'm talking the whole pannel I have within a div tag.
    Thanks

    Defaults to left align
    To center ul.MenuBarHorizontal{margin: 0 auto; width: 32em;} addjusting the width to suit.
    To align right ul.MenuBarHorizontal {float: right; width: 32em;} addjusting the width to suit.

  • Spry Menu Bar Javascript Error - items[i].getElements..."a")[0] is undefined

    I have used a spry menu bar on several websites now, and It works very well.
    However, I get a javascript error everytime a page loads. Like I said the menu bar works, but i would like my page to run error free.
    The error is this  items[i].getElements..."a")[0] is undefined
    and it occurs in the following block of code from the spry js file.
    // 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<items.length; i++)
                if (i > 0 && 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";

    Hi,
    The problem could be in your HTML-code or even in your modified style sheet.
    So that we do not have to guess, please give us these code, preferably by supplying an online URL.
    Ben

  • How to use "Reference Structure" setting in analysis grid item

    Hello expert,
            in Bex analyzer, how to use "Reference Structure" setting in analysis grid item by example?
    Many thanks,

    The variable needs assigned a value, that's why you're getting prompted. When you execute the statement, it's not executing the variable and exec lines.
    Having script output available in a grid would be an enhancement request.

  • How to populate a spry menu using microsoft sql server database?

    Hi
    I would like to use dreamweaver cs4 and spry menu to create a dynamically created menu system.
    My concept is to populate the menu items on the fly using MS sql server as the database technology.
    Can anyone point me in the right direction? I have googled and searched but cant seem to get anywhere.
    Also once i get my menu established, i would like to style it. It seems like a lot of work to style each element by hand. I was wondering if there were some collection of spry menu css files somewhere that i could just attach and presto!
    Thank you.
    Jerry

    I would like to use dreamweaver cs4 and spry menu to create a dynamically created menu system. My concept is to populate the menu items on the fly using MS sql server as the database technology.
    Basically
    create a dynamic XML file containing data from the database
    create A SpryXMLDataSet
    create a SpryRegion where the menu appears
    using SpryRepeat populate the menu
    More info can be found here http://labs.adobe.com/technologies/spry/samples/
    Also once i get my menu established, i would like to style it. It seems like a lot of work to style each element by hand. I was wondering if there were some collection of spry menu css files somewhere that i could just attach and presto!
    Have a look here http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=2141544
    If you require further Spry related support go to http://forums.adobe.com/community/labs/spry

  • How to keep a Spry menu in one file?

    Could somebody explain me how I can keep the HTML code for a
    Spry menu (horizontal) bar in just one file? Of course, the aim is
    to reduce the effort of making later changes in the menu to a
    minimum... I'm not a professionell developer, but I wonder if I can
    do so by using PHP or maybe XML. The question is: How do I do this?
    Thanks for any help!

    http://www.tizag.com/phpT/include.php
    Pablo
    www.paul-dell.com
    "Death is no more than passing from one room into another.
    But there's a
    difference
    for me, you know. Because in this room I know I can have a
    beer."
    "bjjobe" <[email protected]> wrote in
    message
    news:fvelgb$idr$[email protected]..
    > Could somebody explain me how I can keep the HTML code
    for a Spry menu
    > (horizontal) bar in just one file? Of course, the aim is
    to reduce the
    > effort
    > of making later changes in the menu to a minimum... I'm
    not a
    > professionell
    > developer, but I wonder if I can do so by using PHP or
    maybe XML. The
    > cquestion is: How do I do this?
    >
    > Thanks for any help!
    >
    >

  • How to edit existing Spry Menu?

    I created a Spry Menu, but now that it's published (saved) I
    don't see how to edit it so I can easily add more menu items using
    DW's visual tool. All I can get to is the menu's CSS.
    How do I edit an existing Spry Menu to add/remove more items?
    I'm using CS3.

    I guess I dont understand. You can add or remove or change
    the menu in the
    properties panel. You can do all that in the design view as
    well, so I'm
    not sure what I am missing.
    Is the page available to view?
    "morkafur" <[email protected]> wrote in
    message
    news:goja98$mho$[email protected]..
    >I guess I'm not being clear. Sorry.
    >
    > What I'm saying is that when I click "anywhere in the
    menu" or the border
    > around it, I don't get the display where I can click the
    "+" to add a menu
    > item.
    >
    > For example, I have a menu item called "Capabilities".
    If I click that
    > menu
    > item I see properties for it, no problem. I get this.
    >
    > What I'm trying to do, however, is get back the the Spry
    menu item
    > DESIGNER
    > where I can add/remove menu items graphically.
    >
    > Regardless of where I click, that designer does not
    re-appear.
    >
    > If I click the Spry menu item on the toolbar, CS3
    creates a new menu, but
    > doesn't let me edit (using the menu designer) the
    existing one.
    >
    > -- M
    >

  • How to make 1 spry menu for the entire site? but not on each page

    i have a website that i wish to have multiple pages available all form the same menu and late and probably at regular intervals add more tabs to the menu
    is there a way to create a spry menu speratley that the page some how references, something like a frameset but without using framesets?
    im sort of new to webdesigning and unsure of the correct terminology, so i am finding it difficult to look up stuff that i don't know the name for, but will gladly go read someting if you point me in the right direction.
    regards
    for now
    wayne

    You can do this with PHP or ColdFusion
    These are "server side" scripting languages so you will have to test your website after you upload to you web hosting account.
    Or if you set up a local server. Without the local server you will get errors when you open them in firefox.
    To use the following what you do is "Cut" the part you want to be on all pages out, "Paste" it into a seperate document and in its place on your page you put one of the following suitable tags.
    You will also have to rename your main file to .php or .cfm as opposed to .html
    Again, whatever page you put one of these tags on, their extention must change match the type of tag used.
    First Method (PHP):
    PHP is the more common method -
    <?php @ require_once ("yourMenu.html"); ?>
    Require_once is basically a safeguard so that you don't add the menu twice onto a page.
    This will only work for PHP 4+
    This method would work for older versions of php too -
    <?php @ include("yourMenu.html"); ?>
    Second Method (ColdFusion):
    This will only work if your host has ColdFusion installled -
    <cfinclude template="bla.html">
    eg index.html
    <html>
    <head>
    <title>Stuff</title>
    <head>
    <body>
    <?php @ require_once("SpryMenu.html"); ?>
    </body>
    </html>
    SpryMenu.html
    <ul id="menubar1" class="MenuBarHorizontal">
        <li><a class="MenuBarItemSubmenu" href="#">Item 1</a>
            <ul>
                <li><a href="#">Item 1.1</a></li>
    </ul>

  • Re-Using a Spry Menu

    I have created a menu on one page and I cannot find a answer on how to reuse it on a new page, IE canot find aw ay to attached it to the main style sheet?
    Thankyou
    Brad

    Spaline wrote:
    I have created a menu on one page and I cannot find a answer on how to reuse it on a new page, IE canot find aw ay to attached it to the main style sheet?
    Thankyou
    Brad
    Hi Brad,
    Due to the lack of information provided, I shall assume that you create a new document for each page (i.e. not using a template or similar) and you do not have a serverside interpreter like PHP, Coldfusion or ASP.
    If that is the case and assuming that all of your documents are in the same place as index.htm(l), all you need to do is paste and copy the Spry Menu files into each document, this includes the list, constructor and links to the Javascript and CSS files. As a minimum, see the following code where the red parts refer to a Spry Horizontal Menu.
    <!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=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a class="MenuBarItemSubmenu" href="#">Item 1</a>
        <ul>
          <li><a href="#">Item 1.1</a></li>
          <li><a href="#">Item 1.2</a></li>
          <li><a href="#">Item 1.3</a></li>
        </ul>
      </li>
      <li><a href="#">Item 2</a></li>
      <li><a class="MenuBarItemSubmenu" href="#">Item 3</a>
        <ul>
          <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
            <ul>
              <li><a href="#">Item 3.1.1</a></li>
              <li><a href="#">Item 3.1.2</a></li>
            </ul>
          </li>
          <li><a href="#">Item 3.2</a></li>
          <li><a href="#">Item 3.3</a></li>
        </ul>
      </li>
      <li><a href="#">Item 4</a></li>
    </ul>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    If this does not answer your question, please supply an online code.
    Ben

  • How to use multiple Spry Data Sets in one page

    I'm using two spry data sets in one page. When I add the first spry data set to my page everything runs OK, When I add the second spry data set to the page the first data set stops working. Does anyone know what the problem is?
    This is how I have my data sets listed.
    var ds1 = new Spry.Data.HTMLDataSet("/accounts/tower/list.php", "list");
    var ds2 = new Spry.Data.HTMLDataSet("/accounts/tower/numvisits.php", "chart");
    Thanks, let me know if you need more information.

    Good News!
    There is nothing wrong with what you have shown.
    Bad news!
    The problem could be in that part that you have not shown.
    Gramps

  • Referencing a "checked record" from my ADDT Dynamic List using a SPRY Menu

    I have just posted a Beta of my site to:
    http://www.clearwave.biz/Beta/T1COElogin.cfm
    - Username is: Beta
    - Password is: 123
    - Once you are logged in you should see the ADDT list w/one
    order listed.
    - Click on the Printer icon & the Order Agreement will
    open in PDF. (this works fine)
    - Click on the InfoSheet link & the Report will open in
    PDF as well. (this works fine)
    - Everything works fine if you use the links on the same line
    as the record.
    - But if you check the CheckBox on the left, then choose the
    Spry Menu above, Reports/T1 Agreement the report will not work?
    Question: What should the Link be to reference the checked
    item below, pass the CustID value to the report & print the
    PDF?
    (Note: the CF report has the following line in the SQL:
    (tblT1OrderProcessing2.T1CustID = #param.T1CustID#) and the report
    prints fine in Report Builder if I pass it the T1CustID, as well as
    if I click the links on the same line as mentioned above, so this
    is just an issue of grabbing the CustID value from the checked line
    & passing it to the report link in the Spry menu)
    Here is a visual picture of my Dynamic List page:
    http://cerberus.clearwave.com/jerry/Order_Management_Main_Page.jpg
    Thanks in advance for the help,
    jlig

    Here is the Report URL that works perfectly when clicking the
    Printer icon on the right of my List:
    http://www.clearwave.biz/Beta/reports/T1_Service_Agreement.cfm?T1CustID=1508
    and the link to the InfoSheet:
    http://www.clearwave.biz/Beta/reports/T1_Information_Sheet.cfr?T1CustID=1508
    Both of these work perfectly by grabbing the T1CustID value
    of 1508 from the line.

  • How do I get spry menu tab  highlighted when on page ???

    Hey guys I'm stuck
    I'm  trying to get  the tab in the spry menubar to be highlighted  when each relevant page  .. but something isn't right it's not working what am I missing here ???
    now when I hover the btn disappears  and when on the  page the tab isn't highlighted ? Please help ! many thanks in advance for taking the time to look
    I have placed  this code at the  bottom of   sprymenuhorizontal.css to over ride above styles !
    ul.MenuBarHorizontal a span {
        visibility: hidden; 
    ul.MenuBarHorizontal  {
        background: url(images/btn.png) no-repeat;
        height: 35px;
    ul.MenuBarHorizontal :hover, ul.MenuBarHorizontal :focus,
    ul.MenuBarHorizontal .MenuBarItemHover, ul.MenuBarHorizontal .MenuBarItemSubmenuHover, ul.MenuBarHorizontal .MenuBarSubmenuVisible {
        background: url(images/btnhover.png) no-repeat;
    ul.MenuBarHorizontal li.activeMenuItem  {
        background: url(images/btnonpage.png) no-repeat !important;
    then I put in this code  at the top of the page   to link to sprydomutils which is in my spryassest folder!
    <script src="SpryAssets/SpryDOMUtils.js"></script>
    <script>
    function InitPage(){
    Spry.$$('#MenuBar1 li').forEach(function(node){
        var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
        if(a.href == window.location){
            Spry.Utils.addClassName(node,"activeMenuItem");
    Spry.Utils.addLoadListener(InitPage);
    </script>
    <script src="SpryAssets/SpryDOMUtils.js"></script>
    <script>
    function InitPage(){
    Spry.$$('#MenuBar1 li').forEach(function(node){
        var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
        if(a.href == window.location){
            Spry.Utils.addClassName(node,"activeMenuItem");
    Spry.Utils.addLoadListener(InitPage);
    </script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet">
    <style>
    ul.MenuBarHorizontal a span {
        visibility: hidden;  
    ul.MenuBarHorizontal  {
        background: url(images/btn.png) no-repeat;
        height: 35px;
    ul.MenuBarHorizontal :hover, ul.MenuBarHorizontal :focus,
    ul.MenuBarHorizontal .MenuBarItemHover, ul.MenuBarHorizontal .MenuBarItemSubmenuHover, ul.MenuBarHorizontal .MenuBarSubmenuVisible {
        background: url(images/btnhover.png) no-repeat;
    ul.MenuBarHorizontal li.activeMenuItem  {
        background: url(images/btnonpage.png) no-repeat !important;
    </style>

    The reason I asked if you used templates or not is that in this case we would have a centralised script to detect the active menu item.
    If you have a menu on each page (without the template) then it is easy to mark the menu item as being the current one by simply adding a class as follows
    <li class="activeMenuItem"><a href="index.php">Home</a></li>
    Now we merely add a few rules to style the active menu item as in
    .activeMenuItem a {
        background: #a59a84 url(nav_background.png) !important;
        color: #ffffff !important;
    The !important is necessary otherwise the JS will override these values.
    Add the style rules to the bottom of SpryMenuBarHorizontal.css and add the class to each relevant menu item in each document.
    Which brings me to the fact that you have used a horizontal menu bar for vertical positioning. Why? I must admit, the effect is not bad and that is more important.
    Gramps

  • How to make a spry menu "fixed"

    hey folks,
    im redesigning my photography website, and the little technique i had in dreamweaver is rusty.  i am going for a menu bar, across the top (with my name, and links to portfolio pages, contact info, etc.) to be visible at all times throughout the site.  the body of the portfolio pages will be a horizontal scroll bar.  the problem is that when i scroll to see the body, the spry menu scrolls away to the left with the rest.  i just need a tip on either fixing the menu in one place despite what the rest of the page does, or if there is a better tool to use. perhaps just inserting the menu as an image and creating hot spots?  or something like tables?  i know there are several ways to get things done in programs like dreamweaver, just hoping for the one that loads best, looks best, and is easy to edit in the future.  thanks!

    Have a look here http://limpid.nl/lab/css/fixed/header-and-footer
    Gramps

  • How to update all spry menu tabs on all pages

    Hi, Really need some help. I'm working in DW CS3. I've got a
    working Spry menu. ( Eureka!). I quickly made a template to start
    building pages. I left the spry bar as an uneditable region. My
    question is I made a change to the Spry Menu on the homepage. I
    changed one of the always visable tabs from Psychologist to
    "Store", and I'm adding new tabs under "instruction" every day.
    Problem is the already made pages are showing the original
    "non-update" spry menu. Is there a way for me to have DW update the
    spry bar on all pages, or is it because I made that uneditable it
    won't do it and I have to change the template?
    Thanks very much!

    I am not using an external style sheet....
    Why the heck not?  It's so much simpler to maintain site wide styles with one style sheet instead of many.
    Dreamweaver, Linking HTML to External Style Sheets
    As bregent says, CSS is not going to help you with HTML content.  If your site is already built without the aid of Server-Side Includes or DW Templates, another option is Library Items.
    Adobe Dreamweaver * Working with library items
    Nancy O.

  • How to Use name_in in the Pl/sql library

    Dear all,
    I have made a Pl/sql library to disable and enable items on the form
    and when i use set_item_property on some items it gives me an error " no such property for set_item_property", but i think its cause i am trying to set property for an item which is a current item
    how i can avoid this error?
    and do i have to user :system.current_item
    and how i can use it in the Pl/sql library is it like this? name_in('system.current_item');
    best regards,
    Shooosh

    Hi
    Here is a sample code check it out
    procedure rp_set_attr (p_field_name in varchar2, p_flag in varchar2) is
    -- p_flag : H - Hidden,
    -- V - Visible,
    -- D - Disabled,
    -- EM - Enabled Mandatory,
    -- EN - Enabled Non-Mandatory
    v_blk_id block := find_block(p_field_name);
    v_it_id item := find_item(p_field_name);
    begin
    if not id_null(v_blk_id) then
    if nvl(p_flag,'N') = 'D' then
    set_block_property (p_field_name, insert_allowed, property_false);
    set_block_property (p_field_name, update_allowed, property_false);
    set_block_property (p_field_name, delete_allowed, property_false);
    else
    set_block_property (p_field_name, insert_allowed, property_true);
    set_block_property (p_field_name, update_allowed, property_true);
    set_block_property (p_field_name, delete_allowed, property_true);
    end if;
    else
    if not id_null(v_it_id) then
    if p_flag = 'H' then
    set_item_property (p_field_name, visible, property_false);
    else
    if get_item_property (p_field_name, visible) = 'FALSE' then
    set_item_property (p_field_name, visible, property_true);
    end if;
    if get_item_property (p_field_name, item_type) = 'BUTTON' then
    if p_flag = 'D' then
    set_item_property (p_field_name, enabled, property_false);
    else
    set_item_property (p_field_name, enabled, property_true);
    end if;
    elsif get_item_property (p_field_name, item_type) <> 'DISPLAY ITEM' then
    if p_flag = 'D' then
    set_item_property (v_it_id, enabled, property_false);
    set_item_property (v_it_id, visual_attribute, 'DISPLAY_ITEM');
    else
    set_item_property (v_it_id, enabled, property_true);
    set_item_property (v_it_id, navigable, property_true);
    set_item_property (v_it_id, updateable, property_true);
    if get_item_property (p_field_name, item_type) <> 'RADIO GROUP' then
    set_item_property (v_it_id, queryable, property_true);
    end if;
    if p_flag = 'EM' then
    set_item_property (v_it_id, visual_attribute, 'MANDATORY_ATTR');
    if get_item_property (p_field_name, item_type) = 'LIST' then
    set_item_property (v_it_id, required, property_true);
    end if;
    elsif p_flag = 'EN' then
    set_item_property (v_it_id, visual_attribute, 'NON_MANDATORY_ATTR');
    if get_item_property (p_field_name, item_type) = 'LIST' then
    set_item_property (v_it_id, required, property_false);
    end if;
    end if;
    end if;
    end if;
    end if;
    else
    rp_err ('3','19', p_field_name || ' Field Name ');
    end if;
    end if;
    end;
    Regards
    Nagaraj

Maybe you are looking for