OnLoad and Templates

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

  1. #1

    Default OnLoad and Templates

    I have a question that maybe someone can answer here. I am using a template
    in DW6. The edit regions are in the header and the body. I need to call a
    function using OnLoad, but the template will not allow the Body tag to be
    edited unless I break it away from the template. And I wish to avoid that.

    Can anyone suggest a trick or advise another way of doing this.

    I though of having a dummy function on all pages in the editable header
    region that gets called by OnLoad and on those pages that I need, I have the
    dummy function call the actual functions I need. Those pages where I have no
    need for function I could just leave dummy function empty, except it must be
    added to all pages.

    This seems messy to me though. Can anyone suggest a more eloquent approach?

    Regards,

    Sid


    Sid Skiba Guest

  2. Similar Questions and Discussions

    1. Libraries, Templates, Nested Templates, Repeat Regions,
      Hi I have eight categories to display in my site navigation. Each category has at least one (some have two) levels of subcategories. For example...
    2. Issues with templates and nested templates
      Hello, I hope there is someone out there that can help me. I created a website using 1 main template and several nested templates. Everything...
    3. onload validation
      i want an error message THAT LOOKS LIKE THE FLASH FORM ERROR MESSAGES to appear as soon as a form loads. I wrote this but it doesnt work <cfform...
    4. Dreameaver Templates Applide to Templates?
      Hello, I was updating pages using templates today and I found that I had to create several templates to cover different styles of pages. There...
    5. onload/onopen
      once i updated to office 2000 sp3 and windows 2000 sp4, access will no longer fire up the onload and onopen.
  3. #2

    Default Re: OnLoad and Templates

    I like suggestion 2. Will work perfectly. Thanks a bunch.

    "Murray *TMM*" <forums@HAHAgreat-web-sights.com> wrote in message
    news:bgdmkd$bgs$1@forums.macromedia.com...
    > Sid:
    >
    > I can be eloquent about approaches that may or may not be elegant, but all
    > of them are a bit messy! 8)
    >
    > You can -
    >
    > 1. Do exactly what you have described with a dummy function in the head
    > editable region, or
    > 2. Make the 'onLoad' attribute of the <body> tag editable (MODIFY |
    > Templates > Make Tag Editable...). This will create a Template Parameter
    in
    > the onLoad call, e.g., <body onLoad="@@(load_parameter)@@"...>, and you
    then
    > have access to this parameter on each child page via MODIFY | Template
    > Properties. However, if your call is long and involved (like a large
    > preload) it will still be a messy job.
    >
    > The alternative is to use a dynamically written body tag, but DW is not so
    > happy with such pages....
    >
    > --
    > Murray --- ICQ 71997575
    > Team Macromedia Volunteer for Dreamweaver MX
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    > [url]news://forums.macromedia.com/macromedia.dreamweaver[/url] - THE BEST WAY TO GET
    > ANSWERS
    > ==================
    > [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    > [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    > [url]http://www.DreamweaverFAQ.com[/url] - DW FAQs, Tutorials & Resources
    > [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    > ==================
    >
    > "Sid Skiba" <sidskiba@telus.net> wrote in message
    > news:bgd65i$buh$1@forums.macromedia.com...
    > > I have a question that maybe someone can answer here. I am using a
    > template
    > > in DW6. The edit regions are in the header and the body. I need to call
    a
    > > function using OnLoad, but the template will not allow the Body tag to
    be
    > > edited unless I break it away from the template. And I wish to avoid
    that.
    > >
    > > Can anyone suggest a trick or advise another way of doing this.
    > >
    > > I though of having a dummy function on all pages in the editable header
    > > region that gets called by OnLoad and on those pages that I need, I have
    > the
    > > dummy function call the actual functions I need. Those pages where I
    have
    > no
    > > need for function I could just leave dummy function empty, except it
    must
    > be
    > > added to all pages.
    > >
    > > This seems messy to me though. Can anyone suggest a more eloquent
    > approach?
    > >
    > > Regards,
    > >
    > > Sid
    > >
    > >
    >
    >

    Sid Skiba 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