Skip navigation
LaurieLib
Currently Being Moderated

File renders ok in live view but not always in browser

Dec 18, 2012 8:58 AM

Can someone check the code on this page (made from a template) that works sometimes in different browsers and sometimes it doesn't present properly?

 

haworth.org/administration.html

 

All the pages in the site are from one template, except for the index, which is a different style sheet. The index works fine.

 
Replies
  • Currently Being Moderated
    Dec 18, 2012 9:25 AM   in reply to LaurieLib

    We're probably going to need a little more info to help you out.

     

    Which page(s), specifically, show the problem?

    What is supposed to happen?

    What is happening instead?

    Which browsers are affected?

    What version of those browsers are you using?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 18, 2012 10:59 AM   in reply to LaurieLib

    You admin page has this line of HTML code on line #1 which doesn't belong. 

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

     

    Run your Template(s) through the code validation tools below and fix reported errors.

    CSS - http://jigsaw.w3.org/css-validator/

    HTML - http://validator.w3.org/

     

    Save Templates & populate changes to child pages. 

    You will need to re-upload all child pages to remote site.

     

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 18, 2012 11:24 AM   in reply to LaurieLib

    Your index page doesn't have the JSP code on it and it works fine.

     

    If the page falls apart when you remove that line of code from your template,  something else is wrong with your code that also needs attention.

     

    You'll need to manually copy & paste your Template code into the on-line code validators.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 18, 2012 11:48 AM   in reply to LaurieLib

    Make sure when you are creating pages from your template files that you DO NOT use Save As from the original .dwt file to make those new pages. You should be using File > New > Page From Template and then choosing the template to create a page from the dialogue pop up.

     

    The reason I bring this up is because when I looked in your Templates folder online, I saw a file called "body.dwt.html" which typically means you are doing the described no-no from above. That will cause all kinds of problems for you down the road if you do not use the .dwt file correctly.

     

    EDIT: As a secondary note, you do not need to upload the Templates folder (or any .dwt file) at all since DW only uses your .dwt files locally when you "Create Page From Template".

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2012 9:58 AM   in reply to LaurieLib

    First, remove the .html from the end of body.dwt.html from within the Files tab for your site. Dreamweaver Templates use the extension .dwt and must have that at the end in order to function correctly when you use the File > New > Page From Template function to create a page.

     

    Next, remove...

     

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

     

    From the template code (that's all that is making it an "ASP" page as far as DW cares).

     

    Save.

     

    Finally, do not move the .dwt file from the DW generated Templates folder. It MUST be there in order to function for your site. Again, it's only needed locally, you won't need to upload the .dwt or the Templates folder.

     

    Your template page should now work correctly when used as the base for a File > New > Page From Template.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2012 10:57 AM   in reply to LaurieLib

    Without removing the .html from the end of the name of your template, it will not finction as a template in DW.

     

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

     

    Is not correct html coding and absolutely should not be there if you are coding your page as straight html.

     

    EDIT: If, after you remove that line of code, your page for some reason will not render, show us the new page and one of us will be able to tell you what else is causing the problem. That code should have absolutely nothing to do with the display of a standard html page.

     
    |
    Mark as:
  • Jim Carpenter
    546 posts
    Apr 6, 2006
    Currently Being Moderated
    Dec 19, 2012 1:21 PM   in reply to Jon Fritz II

    Jon,

     

    My templates for asp pages are named to this convention: mytemplate.dwt.asp and it seems to work fine for all my asp pages. Now if you are stating for html pages, then it would end with as mytemplate.dwt

     

    That is how DW saved my template files for asp pages. I am not trying to say something here, just trying to get a little clarification if this is not correct (it has been working for me and on the one site that uses asp, I have six template pages that I use). Confused yet?

     

    Jim

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2012 1:48 PM   in reply to Jim Carpenter

    DW does it like that for an ASP based template automatically.

     

    It doesn't add a .html after the .dwt  for a normal html based template though.

     

    Playing around on my machine, I can get them to work with the additional extension. I think I was confusing it with using an .html extension instead of a .dwt which seems to blow right up.

     

    In any case, since the OPs site is not ASP, it should not have the language code before the doctype or the additional .html extension. Since they're running into intermittent errors when using templates, I'm of the mindset that it's best to eliminate all possible contributing factors by getting back to "default" as it were.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points