variables to control image state

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default variables to control image state

    I Does anybody know of a good tutorial or method of using a variable to define
    the image state of a menu? I have a DW template I use to update some consitent
    page elements, including the menus, but I need a way to change the default
    state of the four mainmenu buttons hen you're on a site under that category. I
    could create four templates but I want to keep the site easy to update. Any
    suggestions on how I might go about doing this?

    s_mccoy Guest

  2. Similar Questions and Discussions

    1. Presisting control state across Postbacks
      Hi, At the moment i'm developing a Timer custom control, and i finally reached the stage where i need to persist it across page postbacks. What...
    2. Maintaining state in php w/ session variables
      I am working in php and I am using the DW04 server behaviors for login, logout, and restrict page access. I noticed that each of these behaviors...
    3. Save state when create image
      Hi there, I will be very happy if someone helps me. I need to create dynamic image, and save the state between the postback. I mean I've got 5...
    4. How can I persist the state of a DropDownList control
      Greetings, I"m develop a custom control (render). It inherits a ListControl. In the Render method, I apply an ArrayList to the DataSource property...
    5. Session State error -- trying to load public variables
      Never mind, I think I've realized that some of the Session vars wouldn't not be set at this page's load time. So I just declared them as name/type...
  3. #2

    Default Re: variables to control image state

    It's easy to do with CSS or with javascript.

    With CSS you would have a little stylesheet embedded in the head of each
    page that allows you to set the down state for any given button (each button
    would have a unique id - for example -

    <a href="foo.html" id="button1">...<a href="bar.html" id="button2">

    and then your stylesheet would have this -

    a#button1 { styles }

    on one page, and on another this -

    a#button2 { styles }

    See how that works?

    With javascript, put this in script tags in the head of the document -

    function P7_downImage() {
    var g7="<imagename>"
    var g7url="<pathname>"
    if ((g7=MM_findObj(g7))!=null) {g7.src=g7url;}
    }

    and this on the <body> tag

    onload="P7_downImage()"

    Then on each page you would need to make two edits:

    Set g7 to the *name* of the button (not the file name but the HTML name -
    e.g., "productsbutt"), and g7url to the pathname to the button (e.g.,
    "images/nav/button3.gif"), and bada bing, bada boom!

    There is an excellent tutorial here -

    [url]http://www.projectseven.com/support/answers.asp?id=126[/url]


    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "s_mccoy" <webforumsuser@macromedia.com> wrote in message
    news:dtie57$jer$1@forums.macromedia.com...
    >I Does anybody know of a good tutorial or method of using a variable to
    >define
    > the image state of a menu? I have a DW template I use to update some
    > consitent
    > page elements, including the menus, but I need a way to change the default
    > state of the four mainmenu buttons hen you're on a site under that
    > category. I
    > could create four templates but I want to keep the site easy to update.
    > Any
    > suggestions on how I might go about doing this?
    >

    Murray *TMM* Guest

  4. #3

    Default Re: variables to control image state

    I think I understand the basic concept here and I don't know why I didn't think
    of the css method. However, how does the Dreamweaver template functionality
    impact both of these? My menu is locked on the pages bsaed on the template. I
    could make just these images editable regions but is this necessary?

    s_mccoy Guest

  5. #4

    Default Re: variables to control image state

    > how does the Dreamweaver template functionality
    > impact both of these?
    Not at all. I do the menu CSS in the editable region of the head of the
    page - it's editable on every child page.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "s_mccoy" <webforumsuser@macromedia.com> wrote in message
    news:dtio61$3s0$1@forums.macromedia.com...
    >I think I understand the basic concept here and I don't know why I didn't
    >think
    > of the css method. However, how does the Dreamweaver template
    > functionality
    > impact both of these? My menu is locked on the pages bsaed on the
    > template. I
    > could make just these images editable regions but is this necessary?
    >

    Murray *TMM* Guest

  6. #5

    Default Re: variables to control image state

    The problem now is my menu now cannot be updated across all my pages based on
    this templte because the contents of editable regions are not updated.
    Dreamweaver has templates completely backwards and they cause mor eproblems
    then they solve. Everything should default to editable let me pick what I want
    to lock down. I'm now having problems with the onload behavior not working
    with template pages because it insists on placing the onload event in the
    <body> tag and not in the <head> tag and there is no way to change this default
    behavior other than writing the preload javascript myself which defats teh
    purpose of using a tool like Dreamweaver.

    s_mccoy Guest

  7. #6

    Default Re: variables to control image state

    Dreamweaver has templates right. It's you that are not understanding how to
    use them.

    Editable region changes cannot propagate otherwise you would never be able
    to have unique content on a page.

    What you are asking for is a basic thing and very easy to do in templates,
    but it is important that you understand how templates work first.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "s_mccoy" <webforumsuser@macromedia.com> wrote in message
    news:dtn7oa$ct6$1@forums.macromedia.com...
    > The problem now is my menu now cannot be updated across all my pages based
    > on
    > this templte because the contents of editable regions are not updated.
    > Dreamweaver has templates completely backwards and they cause mor
    > eproblems
    > then they solve. Everything should default to editable let me pick what I
    > want
    > to lock down. I'm now having problems with the onload behavior not
    > working
    > with template pages because it insists on placing the onload event in the
    > <body> tag and not in the <head> tag and there is no way to change this
    > default
    > behavior other than writing the preload javascript myself which defats teh
    > purpose of using a tool like Dreamweaver.
    >

    Murray *TMM* Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139