Skip navigation
TCFunk12
Currently Being Moderated

Imported code not working in DW

Mar 10, 2013 4:53 PM

Tags: #error #dreamweavercs6

I inherited a website that was coded in notepad++.  I've imported all the files into DW but the pages don't display.  I also get an syntax error, don't know where to begin looking.   I've tried to play around with the code and can get some things to display.  If you want to look at the coding the website is www.nusteel.ca. Any help would be appreciated!

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Mar 10, 2013 6:51 PM   in reply to TCFunk12

    your code should start with

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html>

     

    move:

    <title> Steel and Metal Buildings | Manitoba | Canada | Nu-Steel | Alberta </title>

    <meta name="keywords" content="Nu-Steel, Steel Building, Metal Buildings, Steel Structures, Steel Product, Commercial, Residential">

     

    place these in the head section like so:

     

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html>

              <head>

                        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

                        <script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>

                        <script src="js/jquery.curvycorners.min.js" type="text/javascript"></script>

                        <script type="text/javascript" src="js/jquery-ui-1.8.9.custom.min.js"></script>

                        <link type="text/css" href="css/jquery-ui-1.8.9.custom.css" rel="stylesheet" />

                        <title> Steel and Metal Buildings | Manitoba | Canada | Nu-Steel | Alberta </title>

                        <meta name="keywords" content="Nu-Steel, Steel Building, Metal Buildings, Steel Structures, Steel Product, Commercial, Residential">

     

     

    Then run the site through http://validator.w3.org/ to tidy up the rest of the old code

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2013 3:54 PM   in reply to TCFunk12

    At the top of all your pages within the site!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 9:13 AM   in reply to TCFunk12

    Browsers are MUCH more forgiving than DW is. This is a good thing. DW is very focused on proper and valid HTML. Browsers just want to get something on the screen, even if it's invalid code and a very poor rendering.

     

    With regard to your 22 errors, it's likely that many of those errors are insignificant.  Can you show us the live page?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 10:03 AM   in reply to TCFunk12

    No doubt you have an error on the page that is preventing the browser/DW from rendering a display. We would need to see all of the code on the page to determine where that error is.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 10:16 AM   in reply to TCFunk12

    > When I click on live view or view in safari I get a blank page

     

    PHP code needs to be interpreted (i.e. in a server) - do you see the PHP code in Safari or it's completely blank?

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 10:35 AM   in reply to TCFunk12

    You are viewing the site from a server then? If so, you can see the server log for the errors - which server is it?

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:10 AM   in reply to kennethkawamoto2

    Showing us the code could eliminate the 20 questions....

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:17 AM   in reply to TCFunk12

    Show us the code on the page that is broken, please.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:35 AM   in reply to TCFunk12

    Don't worry about that.  Open the page in DW, copy all the code that is shown in Code view, and paste it into a reply here.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 11:53 AM   in reply to TCFunk12

    That page will always be blank - there is nothing there to display!

     

    However, add this to the bottom -

     

    <?php echo $main_content; ?>

     

    and tell us what you get in Live view.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 12:04 PM   in reply to TCFunk12

    Same thing there.  EVERYTHING ON THAT PAGE IS BEING ADDED TO A PHP STRING VARIABLE. There is nothing to display. Note that the LAST FOUR CHARACTERS of your code here are -

     

    '; ?>

     

    which is the end of the string.

     

    What you have is NOT an HTML page. It's a PHP page with no output to the screen.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 12:25 PM   in reply to MurraySummers

    It looks to me that index.php picks up one of these html strings and print it out depending on "pid" query string value.

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 1:36 PM   in reply to TCFunk12

    you should not need to worry about messing up when testing on the live server, before making any changes simply copy the whole local folder and place it on your desktop or a backup folder, then if after you upload after editing and things go pear shaped you simply paste page or the whole folder back in the local directory, then you have no worries!

     

    This site only uses the index.php page to display the other content depending on the menu selected

     

    somehere on your index.php page it will have something like

     

    if ($pid == 'showcase') {

    include 'showcase.php';

    }

     

    the pid is being set by the menu

     

    http://www.nusteel.ca/index.php?pid=showcase

     

    you won't see changes until you have uploaded the showcase.php to the server and tested in a browser, just make sure you make a back up

     

    so you see, your showcase.php and other content pages are only part of the page when included in the index.php they are not a browser ready page on thier own, just conent and style for the index.php page

     

    so when you click about index.php loads the main page and about.php is included in the page and the content of about is parsed into the page with the single variable that all content pages have.

     

    <? echo $main_content; ?>

     

    why not make a new html page, save it as mytest.php

     

     

    top line of the page put:

     

    <? include 'showcase.php'; ?>

     

    in the body add:

     

    <? echo $main_content;?>

     

    you'll see the showcase content. change the include page to see other pages

     

    *** my include sample has your showcase.php in the same directory, if it's in another folder it may be <? include 'pages/showcase.php';?> adjust path as needed

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 1:39 PM   in reply to mazz2000

    I'm afraid all of this is well over the head of TCFunk12 who was expecting to see ordinary HTML in those pages and has found something quite different: a dynamically produced page with NO Design view. The solution? I'm not sure there is one for someone with minimal experience.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 1:47 PM   in reply to MurraySummers

    @ Murray

    I'd say the "solution" is to convert the entire site to plain HTML. PHP used in the current site is utterly pointless. Converting these PHP files to HTML is quite easy - basically you can just save the output source as HTML

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 2:15 PM   in reply to kennethkawamoto2

    I'd say the "solution" is to convert the entire site to plain HTML. PHP used in the current site is utterly pointless. Converting these PHP files to HTML is quite easy - basically you can just save the output source as HTML

    i had this thought but then thought with low level experience he would have much more trouble changing the navigation and making the files all html, the nav now only loads the index.php

     

    It is quite simple to edit this kind of site and once he "gets it" it will be a really simple site to update.

     

    this will never be a wysiwyg site so you'll need to be ok with hand coding, dreamweaver won't do this for you!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 2:20 PM   in reply to mazz2000

    I'm with mazz - I think TCFunk12 is in the deep so to speak. Hiring a third party to perform these relatively simple steps would be a good alternative.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 2:27 PM   in reply to TCFunk12

    that's right! those are on the index.php page!

     

    So now you should have a better understanding of whats going on?

     

     

    what changes need making?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 2:28 PM   in reply to TCFunk12

    i can talk you through until you understand this! thats better than trying to convert this site

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 2:34 PM   in reply to TCFunk12

    once he "gets it"

    sorry! even better ... ladies learn faster than us men!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 2:48 PM   in reply to TCFunk12

    I don't think it's that difficult to convert the site to HTML. You only have 5 pages after all:

    http://www.nusteel.ca/index.php?pid=home → save as "index.html"

    http://www.nusteel.ca/index.php?pid=about → save as "about.html"

    http://www.nusteel.ca/index.php?pid=showcase → save as "showcase.html"

    http://www.nusteel.ca/index.php?pid=product → save as "product.html"

    http://www.nusteel.ca/index.php?pid=contact → save as "contact.html"

     

    Then you need to change all the <a> tages:

    e.g. change

    <a href="index.php?pid=home" style="">HOME</a>

    to

    <a href="index.html" style="">HOME</a>

    You don't have to follow my advice, but there's no point in using PHP since the site is not dynamic. Not only it has no purpose but also it makes your editing much harder.

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 3:00 PM   in reply to TCFunk12

    would you be able to make this new page if it was in html?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 3:05 PM   in reply to kennethkawamoto2

    I don't think it's that difficult to convert the site to HTML. You only have 5 pages after all:

    it's for sure an option, but not always that simple to a novice, she may need to edit webformmailer.php to then return back to the new html, may be a couple of other issues as well, easy for us to fix but not for a person with one weeks experience

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 3:15 PM   in reply to TCFunk12

    make a new file called NewShowcase.html in dreamweaver and save in the main directory with your index.php files etc ...

     

    Open the new page and go to code view

     

    highlight all the code and paste the code below in it's place and then go to design view, make the changes and upload to server and view online until your happy, then come back to me and i'll then show you how to take the code and write the showcase.php that will change the website to the new page layout

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html style=" ">

    <head>

    <script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>

    <script src="js/jquery.curvycorners.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="js/jquery-ui-1.8.9.custom.min.js"></script>

    <link type="text/css" href="css/jquery-ui-1.8.9.custom.css" rel="stylesheet" />

     

    <style>

    #bgImg {       

    /*width: 100%;

    min-width:900px;

    height:600px;*/

    position: absolute;       

    top: 0;       

    left: 0;

    }

    body {

    font-family: 'arial';

    font-size: 12px;

    color: #444444;

    background-color:#000000;

    }

    .pageHeader {

    font-size:30px;

    }

    .topMenu a{

    color: #222222;

    text-decoration:none;

    }

    .bottomMenu {

    border-top:1px solid #333;

    padding: 5px 0px 5px 0px;

    color:#333;

    }

    .header {

    color: #a50000;

    font-size: 16px;

    text-align:justify;

    text-align-last:justify;

    padding: 0px 20px 0px 20px;

    }

    .content {

    padding: 20px;

    text-align: justify;

    }

    #searchBox {

    width: 180px;

    height: 20px;

    background-color:

    transparent;

    position: relative;

    top: 0px;

    left: 10px;

    border-style: none;

    }

    </style>

    <script>

    $(document).ready(function(){

    // settings = {

    // tl: { radius: 8 },

    // tr: { radius: 8 },

    // bl: { radius: 8 },

    // br: { radius: 8 },

    // autoPad: true

    // }

    // $('.search').corner(settings);

    resizeBG();

    });

    $(window).resize(function() {

    resizeBG();

    });

    function resizeBG(){

    imgWidth = $("#bgImg").width();

    winWidth = $(window).width();

    imgOffset = (imgWidth - winWidth) / 2;

    $("#bgImg").css({"left":"-"+imgOffset+"px"});

    if(winWidth<900){

    $("body").css({"overflow-x":"auto"});

    }else{

    $("body").css({"overflow-x":"hidden"});

    }

    }

    </script>

    </head>

    <body style="margin:0px; padding:0px; position: relative; overflow-x: hidden;">

    <center>

    <div style="background-color:#ffffff;">

    <div style="width: 900px; text-align:left; position: relative; ">

    <!--header-->

    <div style="padding-top:20px;padding-bottom:50px;">

    <a href="index.php?pid=home"><img border=0 src="images/Nusteel-logo.png" style="float:left; height:75px;"></a>

    <div style="float:right;padding-top:20px" class="topMenu">

    <div style="padding:0px 20px 0px 20px; float:right; "><a style= "" href="index.php?pid=contact">CONTACT</a></div>

    <div style="padding:0px 20px 0px 20px; float:right; "><a style="" href="index.php?pid=product">PRODUCT</a></div>

    <div style="padding:0px 20px 0px 20px; float:right; "><a style="color:#a50000;" href="index.php?pid=showcase">SHOWCASE</a></div>

    <div style="padding:0px 20px 0px 20px; float:right; "><a style="" href="index.php?pid=about">ABOUT</a></div>

    <div style="padding:0px 40px 0px 20px; float:right; "><a style="" href="index.php?pid=home">HOME</a></div>

    </div>

    <div style="clear:both"></div>

    </div>                         <!--Banner-->

    <!--page content-->

    <div id="mainContentDiv" style="width:900px; position: relative; ">

     

    <script>

    index1 = 0

    imgArray1=new Array("BethelChurchBuilding.JPG","BethelChurchBuilding2.JPG","BethelC hurchBuilding3.JPG","BethelChurchBuilding4.JPG","BethelChurchBuilding5 .JPG","BethelChurchBuilding6.JPG","BethelChurchBuilding7.JPG");

    function nextPic(){

    if(index1 + 1 < $(imgArray1).length){

    index1 = index1 + 1

    }else{

    index1 = 0

    }

    $('#imagegroup1').attr("src", "images/BethelChurch/"+imgArray1[index1]);

     

    }

    function prevPic(obj){

    if(index1 == 0){

    index1 = $(imgArray1).length -1;

    }else{

    index1 = index1 - 1

    }

    $('#imagegroup1').attr("src", "images/BethelChurch/"+imgArray1[index1]);

    }

     

    index2 = 0

    imgArray2=new Array("VbineSteelBuilding.jpg","VbineSteelBuilding2.jpg","VbineSteelB uilding3.jpg","VbineSteelBuilding4.jpg","VbineSteelBuilding5.jpg","Vbi neSteelBuilding6.jpg","VbineSteelBuilding7.jpg","VbineSteelBuilding8.j pg","VbineSteelBuilding9.jpg","VbineSteelBuilding10.jpg");

    function nextPic2(){

    if(index2 + 1 < $(imgArray2).length){

    index2 = index2 + 1

    }else{

    index2 = 0

    }

    $('#imagegroup2').attr("src", "images/VBine/"+imgArray2[index2]);

    }

    function prevPic2(obj){

    if(index2 == 0){

    index2 = $(imgArray2).length -1;

    }else{

    index2 = index2 - 1

    }

    $('#imagegroup2').attr("src", "images/VBine/"+imgArray2[index2]);

    }

    index3 = 0

    imgArray3=new Array("AgandOilfieldSteelBuildingPlant.jpg","MaintenanceSteelBuilding .jpg","R.T.MHomesSteelBuildingPlant.jpg","R.T.MHomesSteelBuildingPlant MB.jpg","HoneyFarmSteelBuilding.jpg");

    function nextPic3(){

    if(index3 + 1 < $(imgArray3).length){

    index3 = index3 + 1

    }else{

    index3 = 0

    }

    $('#imagegroup3').attr("src", "images/"+imgArray3[index3]);

    }

    function prevPic3(obj){

    if(index3 == 0){

    index3 = $(imgArray3).length -1;

    }else{

    index3 = index3 - 1

    }

    $('#imagegroup3').attr("src", "images/"+imgArray3[index3]);

    }

    </script>

    <div style="padding-top:0px; padding-bottom:50px;">

    <div class="pageHeader">

    SHOWCASE

    </div>

    <div class="prodContent" id="buildingType">

    <div>

    <div style="width:55%;float:left;">

    <img onclick="prevPic()" src="images/L-Arrow.png" style="margin-bottom:75px; cursor:pointer; ">

    <img id="imagegroup1" src="images/BethelChurch/BethelChurchBuilding.JPG" style="text-align:center; width:400px; height:200px;">

    <img onclick="nextPic()" src="images/R-Arrow.png" style="margin-bottom:75px;cursor:pointer; ">

    </div>

    <div style="width:45%;float:left; text-align:justify">

    <div class="header" style="text-align:left; padding:0px 0px 10px 0px;">Bethel Bergthaler Mennonite Church</div>

    Bethel Church constructed an additional 16,815sq. feet in 2009 to their existing building.  The addition includes our SSR roof,

    fa&ccedil;ade and snow stops.

    <!--

    <div class="header" style="text-align:left; padding:20px 0px 0px 0px;">PROJECT SPECS</div>

    <div>

    <div style="float:left; width:150px">STRUCTURE TYPE</div>

    <div style="float:left;" >Pre Engeneered Steel Building</div>

    </div>

    <div style="clear:both">

    <div style="float:left; width:150px">STEEL TONNAGE</div>

    <div style="float:left; ">610 Tons</div>

    </div>

    <div style="clear:both">

    <div style="float:left; width:150px">STEEL TYPE</div>

    <div style="float:left; ">Grade 50</div>

    </div>

    <div style="clear:both">

    <div style="float:left; width:150px">FINISH</div>

    <div style="float:left; ">Custom Red</div>

    </div>

    -->

    </div>

    <div style="clear:both"></div>

    </div>

    <div  style="clear:both; padding-top:20px;">

    <div style="width:55%;float:left;">

     

    <img onclick="prevPic2()" src="images/L-Arrow.png" style="margin-bottom:75px;cursor:pointer; ">

     

    <img id="imagegroup2" src="images/VBine/VbineSteelBuilding.jpg" style="width:400px; height:200px;">

     

    <img onclick="nextPic2()" src="images/R-Arrow.png" style="margin-bottom:75px;cursor:pointer; ">

     

    </div>

    <div style="width:45%;float:left; text-align:justify">

    <div class="header" style="text-align:left; padding:0px 0px 10px 0px;">VBine Energy</div>

    In Decemeber 2010, VBine Energy announced the expansion of a brand

    new 30,000 square foot manufacturing facility to be erected in

    Winkler, Manitoba.

    <!--

    <div class="header" style="text-align:left; padding:20px 0px 0px 0px;">PROJECT SPECS</div>

    <div>

    <div style="float:left; width:150px">STRUCTURE TYPE</div>

    <div style="float:left; ">Pre Engeneered Steel Building</div>

    </div>

    <div style="clear:both">

    <div style="float:left; width:150px">STEEL TONNAGE</div>

    <div style="float:left; ">610 Tons</div>

    </div>

    <div style="clear:both">

    <div style="float:left; width:150px">STEEL TYPE</div>

    <div style="float:left; ">Grade 50</div>

    </div>

    <div style="clear:both">

    <div style="float:left; width:150px">FINISH</div>

    <div style="float:left; ">Custom Red</div>

    </div>

    -->

    </div>

    <div style="clear:both"></div>

    </div>

     

    </div>

    <div style="clear:both"></div>

    </div>

    </div>

    <!--page footer-->

    </div>

    </div>

    <div style="background-color:#000000; clear:both; position: relative; padding-bottom:100px;padding-top:30px;">

    <div style="width: 900px; text-align:left; position: relative; ">

    <div style="float:left;">

    <a href="index.php?pid=home"><img border=0 src="images/Nusteel-Logo-grey.png" style="float:left; height:100px; "></a>

    <div style="clear:both;height:10px;"></div>

    <div style="float:left; width:270px;">

    <div class="bottomMenu">Don't hesitate to get in contact with us.</div>

    <div class="bottomMenu"><img src="images/A-Icon.png" width="10px"> Box 1416 Winkler, Manitoba, Canada R6W 4B4</div>

    <div class="bottomMenu"><img src="images/E-Icon.png" width="10px"> nusteel@mts.net</div>

    <div class="bottomMenu"><img src="images/PH-Icon.png" width="10px"> 204.325.4368    <img src="images/FX-Icon.png" width="10px"> 204.325.5500</div>

    </div>

    <div style="float:left; width:270px; margin-left:10px;">

    <div class="bottomMenu" style="cursor:pointer;" onclick="document.location.href='index.php?pid=product'">PRODUCT</div >

    <div class="bottomMenu" style="border-bottom:1px solid #333; cursor:pointer;" onclick="document.location.href='index.php?pid=showcase'">PROJECT SHOWCASE</div>

    </div>

    </div>

    <div style="float:right;margin-top:40px">

    <div class="search" style="width:200px; height:20px; background-color:#ccc;">

    <input id="searchBox" type="text" value="Search" style="color:#444" onclick="if(this.value=='Search'){this.value=''}" onblur="if(this.value==''){this.value='Search'}">

    </div>

    <br>

    <img src="images/QUASARcert.jpg">

    </div>

    </div>

    <div style="clear:both;"></div>

    </div>

    <center>

    </body>

    </html>

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 15, 2013 3:24 PM   in reply to mazz2000

    That's actually simple too. The redirect URL:

    http://www.nusteel.ca/index.php?pid=contact&mgs=Thank%20you%20for%20yo ur%20intrest.%20We%20will%20be%20in%20contact%20with%20you%20shortly

    This is hardcoded in the HTML so the matter of just changing it to "thankyou.html" (without the form!)

     

    But may be you're right and there may be other little things

     

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.uk/

     
    |
    Mark as:
1 2 Previous Next

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