Professional Web Applications Themes

Server Side Includes and Javascript - Macromedia Dynamic HTML

Can one safely include javascript in a server-side include (SSI) file? It seems to work but don't know if it will create problems down the line. I am using a roll-over navigation bar created and generated in Fireworks. It seems to defeat the purpose of using SSI if you can't include the javascript since if there was a change at some point to the navigation bar you would have to change the javascript that went with it. And it is nice to keep all that extra coding out of every file on the site. IS there an official word on ...

  1. #1

    Default Server Side Includes and Javascript

    Can one safely include javascript in a server-side include (SSI) file? It seems
    to work but don't know if it will create problems down the line. I am using a
    roll-over navigation bar created and generated in Fireworks. It seems to
    defeat the purpose of using SSI if you can't include the javascript since if
    there was a change at some point to the navigation bar you would have to change
    the javascript that went with it. And it is nice to keep all that extra coding
    out of every file on the site. IS there an official word on this or some
    process in creating a SSI file that could prevent any problems?

    You can see the file I created using this at <a target=_blank
    class=ftalternatingbarlinklarge
    href="http://www.hopkinsandporter.com/test.shtml">[url]http://www.hopkinsandporter.co[/url]
    m/test.shtml</a>

    TSemmes Guest

  2. #2

    Default Re: Server Side Includes and Javascript

    > Can one safely include javascript in a server-side include (SSI) file?

    Yes, but it makes your parent page's derived code messy.
    > I am using a
    > roll-over navigation bar created and generated in Fireworks.
    This is a big mistake for so many reasons.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (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
    ==================


    "TSemmes" <webforumsusermacromedia.com> wrote in message
    news:e52id2$pt1$1forums.macromedia.com...
    > Can one safely include javascript in a server-side include (SSI) file? It
    > seems
    > to work but don't know if it will create problems down the line. I am
    > using a
    > roll-over navigation bar created and generated in Fireworks. It seems to
    > defeat the purpose of using SSI if you can't include the javascript since
    > if
    > there was a change at some point to the navigation bar you would have to
    > change
    > the javascript that went with it. And it is nice to keep all that extra
    > coding
    > out of every file on the site. IS there an official word on this or some
    > process in creating a SSI file that could prevent any problems?
    >
    > You can see the file I created using this at <a target=_blank
    > class=ftalternatingbarlinklarge
    > href="http://www.hopkinsandporter.com/test.shtml">[url]http://www.hopkinsandporter.co[/url]
    > m/test.shtml</a>
    >

    Murray *ACE* Guest

  3. #3

    Default Re: Server Side Includes and Javascript

    Murray
    this leaves more questions.
    First what is a parent page (the template file?) and what is messy about the
    code?
    Also why is a roll-over generated from Fireworks a problem?. IS there an
    alternative? I tried using pure CSS and text links for the navigation bar
    orginally but could not get the spacing and look I wanted so I used the "insert
    button" tool in Fireworks the exported to HTML.

    Tom

    TSemmes Guest

  4. #4

    Default Re: Server Side Includes and Javascript

    When you are using includes, there are two kinds of files -

    1. The parent page: the page receiving the included content; the page being
    named '.shtml'; the page that provides the structure within which the
    included content resides; the page containing the <!--#include directives.
    2. The include files: the code fragments that are being included in the
    parent page.
    > and what is messy about the
    > code?
    You have HTML and javascript all mixed together. It makes for a messy
    looking page.
    > Also why is a roll-over generated from Fireworks a problem?
    I suppose I could have looked at the link you posted. I can see that what
    you used is not a problem. However, you do have javascript in the body of
    the page that should be in the head....

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (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
    ==================


    "TSemmes" <webforumsusermacromedia.com> wrote in message
    news:e54akr$29m$1forums.macromedia.com...
    > Murray
    > this leaves more questions.
    > First what is a parent page (the template file?) and what is messy about
    > the
    > code?
    > Also why is a roll-over generated from Fireworks a problem?. IS there an
    > alternative? I tried using pure CSS and text links for the navigation bar
    > orginally but could not get the spacing and look I wanted so I used the
    > "insert
    > button" tool in Fireworks the exported to HTML.
    >
    > Tom
    >

    Murray *ACE* Guest

  5. #5

    Default Re: Server Side Includes and Javascript

    > You have HTML and javascript all mixed together. It makes for a messy
    > looking page.
    Isn't javascript meant to be combined with HTML? And messy in what way?
    Visually the way the user sees it? or the way the coder sees it?
    > However, you do have javascript in the body of
    > the page that should be in the head....
    That works. Thanks!

    TSemmes Guest

  6. #6

    Default Re: Server Side Includes and Javascript

    > Isn't javascript meant to be combined with HTML?

    Yes, but usually in the head of the page.
    > And messy in what way?
    Cluttered.
    > Visually the way the user sees it? or the way the coder sees it?
    The way the coder sees it.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (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
    ==================


    "TSemmes" <webforumsusermacromedia.com> wrote in message
    news:e54e0r$6h2$1forums.macromedia.com...
    >> You have HTML and javascript all mixed together. It makes for a messy
    > > looking page.
    >
    > Isn't javascript meant to be combined with HTML? And messy in what way?
    > Visually the way the user sees it? or the way the coder sees it?
    >
    > > However, you do have javascript in the body of
    > > the page that should be in the head....
    > That works. Thanks!
    >

    Murray *ACE* Guest

Similar Threads

  1. Big Problem with Server Side Includes (SSI)
    By james_w4 in forum Macromedia Contribute Connection Administrtion
    Replies: 2
    Last Post: May 12th, 10:43 AM
  2. server side includes
    By new found webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 16
    Last Post: April 25th, 11:04 AM
  3. Server Side Includes and Contribute 4
    By Marje in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: January 2nd, 05:13 PM
  4. Random Server Side Includes
    By Microsoft News in forum ASP
    Replies: 3
    Last Post: September 17th, 11:33 PM
  5. Editing Server Side Includes in Design View
    By BurnsyNWMS webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 25th, 11:53 PM

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