Professional Web Applications Themes

rendering <div Oops! rendering div style:display=none - HTML & CSS

The default for a certain page I'm working on is to hide a section of the page when it's loaded. So i set a div tag as follows: <div id="divAdvancedOptions" name="divAdvancedOptions" style="display:none;"> Works fine, but also works a bit too well in DreamWeaver (8 and 8.01) such that the IDE doesn't render the material within the <div. So in order to render it I must change the default to display:inline, which then messes up synchronization of the javascript-based "show more"/"show less" control. Does DreamWeaver provide an "ignore" fearture for a <div having display:none ? Or, can it be made to ...

  1. #1

    Default rendering <div Oops! rendering div style:display=none

    The default for a certain page I'm working on is to hide a section of the page
    when it's loaded. So i set a div tag as follows:

    <div id="divAdvancedOptions" name="divAdvancedOptions" style="display:none;">

    Works fine, but also works a bit too well in DreamWeaver (8 and 8.01) such
    that the IDE doesn't render the material within the <div.

    So in order to render it I must change the default to display:inline, which
    then messes up synchronization of the javascript-based "show more"/"show less"
    control.

    Does DreamWeaver provide an "ignore" fearture for a <div having display:none ?
    Or, can it be made to recognize and execute the javascript?

    Note: the script that manages the DHTML is in a seperate file, and both have
    the .php extension. Note also that php has nothing to do with the dhtml
    rendering. Without passing the code through PHP I can edit just fine in
    DreamWeaver and see what I'll get on the other side.


    Mark Richards Guest

  2. #2

    Default Re: rendering <div Oops! rendering div style:display=none

    Use a Design-time stylesheet that sets the applicable rule for that div to
    display:block.

    --
    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
    ==================


    "Mark Richards" <mark.richardsmassmicro.com> wrote in message
    news:drdpo1$o6h$1forums.macromedia.com...
    > The default for a certain page I'm working on is to hide a section of the
    > page
    > when it's loaded. So i set a div tag as follows:
    >
    > <div id="divAdvancedOptions" name="divAdvancedOptions"
    > style="display:none;">
    >
    > Works fine, but also works a bit too well in DreamWeaver (8 and 8.01) such
    > that the IDE doesn't render the material within the <div.
    >
    > So in order to render it I must change the default to display:inline,
    > which
    > then messes up synchronization of the javascript-based "show more"/"show
    > less"
    > control.
    >
    > Does DreamWeaver provide an "ignore" fearture for a <div having
    > display:none ?
    > Or, can it be made to recognize and execute the javascript?
    >
    > Note: the script that manages the DHTML is in a seperate file, and both
    > have
    > the .php extension. Note also that php has nothing to do with the dhtml
    > rendering. Without passing the code through PHP I can edit just fine in
    > DreamWeaver and see what I'll get on the other side.
    >
    >

    Murray *TMM* Guest

  3. #3

    Default Re: rendering <div Oops! rendering div

    It looks like a design-time stylesheet would be very useful, but in this case I
    am uncertain how it might be applied to solve the rendering issue in DW's IDE.

    In this case (simplified code follows):

    // this displays the option prompt "More choices and Features", or "Fewer
    Choices and Features"

    <div id="divMoreOptions" name="divMoreOptions" style="display:inline;">
    <a href="javascript:expandOptions();"><img src="../Graphics/plus.gif"
    border="0" /></a>&nbsp;
    <a href="javascript:expandOptions();">More Choices and Features</a>
    </div>
    <div id="divLessOptions" name="divLessOptions" style="display:none;">
    <a href="javascript:collapseOptions();"><img src="../Graphics/minus.gif"
    border="0" /></a>&nbsp;
    <a href="javascript:collapseOptions();">Fewer Choices and Features</a>
    </div>

    // This is the <div tag that is being turned on and off. Note the default
    is none.
    <div id="divAdvancedOptions" name="divAdvancedOptions" style="display:none;">
    stuff to display in DW ide by default, but hide in production
    </div>

    The stylesheet doesn't control any of this - some external javascript does,
    and this is in an include statement in a portion of the php:

    include('./javastuff.js.php');

    I could put the javascript in the main source file, but uncertain that it will
    matter much to DW.

    My workaround has been to change this:
    <div id="divAdvancedOptions" name="divAdvancedOptions"
    style="display:inline;">

    and then call an init() process that changes it to "none" when the page loads.
    It's messy because everything first renders in production and then goes away.

    If there's a way to do it in the stylesheet I'd love to know the trick (and
    sorry that this may be going beyond DW itself).


    Mark Richards Guest

  4. #4

    Default Re: rendering <div Oops! rendering div style:display=none

    Create a stylesheet with this rule -

    #divAdvancedOptions { display:inline; }

    /* why are you displaying <div> tags inline? */

    save it. Link to it as a DT stylesheet only. To do that you would use the
    menu triggered from the top right of the CSS panel.

    --
    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
    ==================


    "Mark Richards" <mark.richardsmassmicro.com> wrote in message
    news:dre3n0$7bp$1forums.macromedia.com...
    > It looks like a design-time stylesheet would be very useful, but in this
    > case I
    > am uncertain how it might be applied to solve the rendering issue in DW's
    > IDE.
    >
    > In this case (simplified code follows):
    >
    > // this displays the option prompt "More choices and Features", or
    > "Fewer
    > Choices and Features"
    >
    > <div id="divMoreOptions" name="divMoreOptions" style="display:inline;">
    > <a href="javascript:expandOptions();"><img src="../Graphics/plus.gif"
    > border="0" /></a>&nbsp;
    > <a href="javascript:expandOptions();">More Choices and Features</a>
    > </div>
    > <div id="divLessOptions" name="divLessOptions" style="display:none;">
    > <a href="javascript:collapseOptions();"><img src="../Graphics/minus.gif"
    > border="0" /></a>&nbsp;
    > <a href="javascript:collapseOptions();">Fewer Choices and Features</a>
    > </div>
    >
    > // This is the <div tag that is being turned on and off. Note the
    > default
    > is none.
    > <div id="divAdvancedOptions" name="divAdvancedOptions"
    > style="display:none;">
    > stuff to display in DW ide by default, but hide in production
    > </div>
    >
    > The stylesheet doesn't control any of this - some external javascript
    > does,
    > and this is in an include statement in a portion of the php:
    >
    > include('./javastuff.js.php');
    >
    > I could put the javascript in the main source file, but uncertain that it
    > will
    > matter much to DW.
    >
    > My workaround has been to change this:
    > <div id="divAdvancedOptions" name="divAdvancedOptions"
    > style="display:inline;">
    >
    > and then call an init() process that changes it to "none" when the page
    > loads.
    > It's messy because everything first renders in production and then goes
    > away.
    >
    > If there's a way to do it in the stylesheet I'd love to know the trick
    > (and
    > sorry that this may be going beyond DW itself).
    >
    >

    Murray *TMM* Guest

Similar Threads

  1. RENDERING SILHOUETTE
    By chicoboy in forum Macromedia Director 3D
    Replies: 0
    Last Post: May 4th, 03:44 PM
  2. rendering problem
    By luoifong in forum Macromedia Director Basics
    Replies: 0
    Last Post: February 10th, 10:35 PM
  3. ASP pages not rendering
    By Alan Easton in forum ASP Database
    Replies: 8
    Last Post: November 22nd, 07:20 PM
  4. Rendering anomaly
    By Dave Mennenoh in forum Macromedia Director 3D
    Replies: 0
    Last Post: October 8th, 06:16 PM
  5. Rendering problem.
    By biiin webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: October 6th, 10:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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