Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Contractable Headers Script

  1. #11
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The part that belongs in the head is in the head. of the leftnav.htm and the part that's belongs in the body is in there again in the leftnav.htm If I have to put the script in the head of the index.html page too then basically it's not an include page is it?

    But lets say that's the case.. and I keep the head script part in the head of index.html (and every other page on my site :-( ) now I have to put other scripts. that's going to cause a problem isn't it?

    Angela

  2. #12
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Argh. I think you're missing something here. What it sounds like is that you have a whole HTML page, scripts and all, in leftnav.htm:
    Code:
    <html>
      <head>
        <script type="text/javascript">
          // The "head" bit of the script
        </script>
      </head>
      <body>
        <script type="text/javascript">
          // The "body" bit of the script
        </script>
      </body>
    </html>
    And then you have another whole page in index.html (and all the other pages):
    Code:
    <html>
      <head>
      </head>
      <body>
        <!-- Include leftnav.htm here -->
      </body>
    </html>
    This won't work, because it means that the eventual output of index.html is:
    Code:
    <html>
      <head>
      </head>
      <body>
        <html>
          <head>
            <script type="text/javascript">
              // The "head" bit of the script
            </script>
          </head>
          <body>
            <script type="text/javascript">
              // The "body" bit of the script
            </script>
          </body>
        </html>
      </body>
    </html>
    ... which is very invalid HTML, but, more importantly, means that the "head" bit of the script isn't in the "real" (first) head. Instead, you need to have two includes:
    Code:
    <!-- leftnav-head.html -->
    <script type="text/javascript">
      // The "head" bit of the script
    </script>
    Code:
    <!-- leftnav-body.html -->
    <script type="text/javascript">
      // The "body" bit of the script
    </script>
    ... and include them both in the correct positions in index.html:
    Code:
    <html>
      <head>
        <!-- Include leftnav-head.html here -->
      </head>
      <body>
        <!-- Include leftnav-body.html here -->
      </body>
    </html>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #13
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ohhhhhhhhhhhhhhhhhhhhhh I didn't understand that at all when you were saying include 2 Hmmmmmm Very interesting. OK let me try that.
    Thank you

  4. #14
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Nope that didn't work either. This is getting very frustrating. I'm sure you are equally as frustrated and I really appreciate your trying to help me.

    Angela

  5. #15
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In that case:
    PLEASE: Include the URL to your problematic webpage that you want help with.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #16
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK - this is my test site http://www.photogiftzone.com

    index.htm works as I have the script in the head

    testpage.htm is the page that has the two includes of navhead.htm and navbody.htm

    testtotal.htm just has the whole leftnav.htm included

    I even tried leftnav.htm (by itself, not included in anotherpage) by calling the script (head part in a .js file) and that didn't work either so it just appears that this script only wants to be resident and will not work any other way.

    Angela

  7. #17
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    it just appears that this script only wants to be resident and will not work any other way.
    It's got nothing to do with that. I've absolutely no idea what you're trying to do here. On testpage.htm, you haven't included anything, although you appear to be attempting to include both the head section and the body section in the body (I'm guessing that's what the <!-- webbot --> tags are all about). That simply looks as if it hasn't been parsed. However, you also seem to have put the body part of the script manually into testpage.htm. Also, both navbody.htm and navhead.htm contain <html>, <head> and <body> elements, which they shouldn't (as I explained earlier).
    Also, there's some seriously bad markup and styling in those documents; see:
    Code:
    <b style="cursor:pointer; cursor:hand" onClick="expandcontent('sc1')" style=&{head};>
    I suggest you abandon FrontPage and create your page yourself. If you're looking for clean code, as you'd seem to be by fiddling with these includes, FrontPage is not the way to go.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #18
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, you didn't say not to include the html tags but.... I tried it without them and that didn't work so I tried it with. I understand about the dirty front page code but unfortunately table positioning confuses me terribly. (as does all this)

    I took off the html codes listed the includes as you have written them above made sure the navhead was within the <head></head> and the navbody.htm within the body tag.
    And nothing happens. It doesn't even show up.

    You showed me this
    <b style="cursorointer; cursor:hand" onClick="expandcontent('sc1')" style=&{head};>

    That's the way it's always been and since I am such a beginner at this, I don't know what's wrong so even though you do, merely showing it to me does not help. I have no clue what's wrong with it.

    Again, I do appreciate your trying to help but please try and remember back to when you first started.

    Thank you

  9. #19
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    please try and remember back to when you first started.
    I was seven :-\
    I think you may have had the right idea in the first place with the HTML structure. Having nosed around this, I believe that's what the tag="body" thing is for. In this case, you will need to change it to tag="head" for the purpose of the code in the head. However, this also means that you can use your single include, by including the different tags at different points like so:
    Code:
    <!-- webbot bot="include" tag="head" u-include="leftnav.htm" -->
    </head>
    <body>
    <!-- webbot bot="include" tag="body" u-include="leftnav.htm" -->
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #20
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <!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>
    <title>Untitled Page</title>
    script goes here
    </head>
    <body>
    Controls go here
    </body>
    </html>

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
  •