General Chat
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsGeneralGeneral Chat

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 5th, 2005, 06:37 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,121 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 44 sec
Reputation Power: 3
Send a message via AIM to LLX Send a message via Yahoo to LLX
"You codded it in dream weaver didn't you"

when i asked my web dev partner why the code was so hard to trace and hof couse the answer was yes

before fixing it
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Nanny-Online.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="text.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="950" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="780" valign="top"> <IFRAME 
            src="header.htm" width=780 
            height=125 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
      <IFRAME 
            src="navigation.htm" width=780 
            height=168 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
			<table width="780" height="410" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff">
  <tr valign="top"> 
          <td width="125" align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
  <tr>
    <td><div align="center">
                    <IFRAME 
            src="index-skyscrapper-left.php" width=120 
            height=600 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
                  </div></td>
  </tr>
</table>
       </td>
          <td width="240" align="center"><table id="Table_01" width="240" height="175" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td> <img src="images/text-area_01.gif" width="9" height="40" alt=""></td>
                <td colspan="2"> <img src="images/text-area_02Chevy.gif" width="231" height="40" alt=""></td>
              </tr>
              <tr> 
                <td background="images/text-area_03.gif">&nbsp; </td>
                <td height="126" valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
                    <tr>
                      <td width="50%" align="center" valign="top"><a href="articles/anthony.htm"><img src="images/Chevy%20Chase.jpg" alt="Chevy Chase" width="100" height="100" border="0"></a></td>
                      <td width="50%" valign="top" class="heading-text"><p class="heading-text">CHEVY 
                          CHASE WITH CELEBRITY CHEF ANTHONY BALLARD<br>
                          <span class="sub-text">Chef Antony Ballard who rubs 
                          shoulders with the likes of Chevy Chase...</span></p>
                        </td>
                    </tr>
                  </table> </td>
                <td background="images/text-area_05.gif">&nbsp; </td>
              </tr>
              <tr> 
                <td> <img src="images/text-area_06.gif" width="9" height="9" alt=""></td>
                <td> <img src="images/text-area_07.gif" width="223" height="9" alt=""></td>
                <td> <img src="images/text-area_08.gif" width="8" height="9" alt=""></td>
              </tr>
            </table>
            <br>
            <table id="Table_01" width="240" height="175" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td> <img src="images/text-area_01.gif" width="9" height="40" alt=""></td>
                <td colspan="2"> <img src="images/text-area_02HerbGarden.gif" width="231" height="40" alt=""></td>
              </tr>
              <tr> 
                <td background="images/text-area_03.gif">&nbsp; </td>
                <td height="126" valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
                    <tr> 
                      <td width="50%" align="center" valign="top" class="sub-text"><a href="articles/herbgarden.htm" target="_parent"><img src="images/flower-basket.jpg" alt="Depression" width="100" height="100" border="0"></a></td>
                      <td width="50%" valign="top" class="heading-text"><p class="heading-text">A 
                          KITCHEN HERB GARDEN<span class="sub-text"><br>
                          I’m a House Manager who likes to cook. On the 
                          chef’s day off I will often get into the kitchen 
                          and prepare something I saw on the Food Network...</span></p></td>
                    </tr>
                  </table></td>
                <td background="images/text-area_05.gif">&nbsp; </td>
              </tr>
              <tr> 
                <td> <img src="images/text-area_06.gif" width="9" height="9" alt=""></td>
                <td> <img src="images/text-area_07.gif" width="223" height="9" alt=""></td>
                <td> <img src="images/text-area_08.gif" width="8" height="9" alt=""></td>
              </tr>
            </table>
            <p>&nbsp;</p><table width="234" height="60" border="0" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
              <tr> 
                <td><div align="center"> 
                    <IFRAME 
            src="index-halfbanner-left.php" width=234 
            height=60 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
                  </div></td>
              </tr>
            </table>
            
          </td>
    <td width="240"><table id="Table_01" width="240" height="175" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td> <img src="images/text-area_01.gif" width="9" height="40" alt=""></td>
                <td colspan="2"> <img src="images/text-area_02Amber.gif" width="231" height="40" alt=""></td>
              </tr>
              <tr> 
                <td background="images/text-area_03.gif">&nbsp; </td>
                <td height="126" valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
                    <tr> 
                      <td width="50%" align="center" valign="top"><a href="articles/amber.htm" target="_parent"><img src="images/Amber.jpg" alt="Amber" width="100" height="100" border="0"></a></td>
                      <td width="50%" valign="top" class="heading-text"><p class="heading-text">AMBER 
                          AS MOM & CELEBRITY<br>
                          <span class="sub-text">Amber, the celebrated pop singer 
                          and songwriter, who gave a spectacular performance at 
                          Liza Minelli's wedding...</span></p></td>
                    </tr>
                  </table></td>
                <td background="images/text-area_05.gif">&nbsp; </td>
              </tr>
              <tr> 
                <td> <img src="images/text-area_06.gif" width="9" height="9" alt=""></td>
                <td> <img src="images/text-area_07.gif" width="223" height="9" alt=""></td>
                <td> <img src="images/text-area_08.gif" width="8" height="9" alt=""></td>
              </tr>
            </table>
            <br>
            <table id="Table_01" width="240" height="175" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td> <img src="images/text-area_01.gif" width="9" height="40" alt=""></td>
                <td colspan="2"> <img src="images/text-area_02Pediatric-Denti.gif" width="231" height="40" alt=""></td>
              </tr>
              <tr> 
                <td background="images/text-area_03.gif">&nbsp; </td>
                <td height="126" valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2">
                    <tr> 
                      <td width="50%" align="center" valign="top" class="sub-text"><a href="articles/dentistry.htm" target="_parent"><img src="images/DrDenis.jpg" alt="Pediatric Dentistry" width="100" height="100" border="0"></a><br>
                        <span class="sub-text">Dr. Denis M. Weintraub</span> </td>
                      <td width="50%" valign="top" class="heading-text"><p class="heading-text">PEDIATRIC 
                          DENTISTRY <br>
                          <span class="sub-text">Going to the dentist in the past 
                          has often been compared to being on a scary ride that 
                          you can't get off too soon, but it's not like that anymore...</span></p></td>
                    </tr>
                  </table></td>
                <td background="images/text-area_05.gif">&nbsp; </td>
              </tr>
              <tr> 
                <td> <img src="images/text-area_06.gif" width="9" height="9" alt=""></td>
                <td> <img src="images/text-area_07.gif" width="223" height="9" alt=""></td>
                <td> <img src="images/text-area_08.gif" width="8" height="9" alt=""></td>
              </tr>
            </table>
            <p>&nbsp;</p><table width="234" height="60" border="0" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
              <tr> 
                <td><div align="center"> 
                    <IFRAME 
            src="index-halfbanner-right.php" width=234 
            height=60 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
                  </div></td>
              </tr>
            </table> </td>
    <td width="125" align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
              <tr>
                <td><div align="center">
                    <IFRAME 
            src="index-skyscrapper-right.php" width=120 
            height=600 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
                  </div></td>
              </tr>
            </table>
            
          </td>
  </tr>
</table><IFRAME 
            src="footer.htm" width=780 
            height=75 FRAMEBORDER=0; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
    </td>
    <td align="center" valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="0">
        <tr> 
          <td>
<div align="center"> </div></td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
</body>
</html>


after
php Code:
Original - php Code
  1.  
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  3. <html>
  4. <head>
  5. <title>Nanny-Online.com</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <link href="text.css" rel="stylesheet" type="text/css">
  8. </head>
  9.  
  10. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  11. <!--Header-->
  12. <table width="950" border="0" cellspacing="0" cellpadding="0"><tr><td width="780" valign="top">
  13. <IFRAME src="header.htm" width=780 height=125 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  14. </tr></td>
  15. <!--Nav-->
  16. <tr><td width="780" valign="top">
  17. <IFRAME src="navigation.htm" width=780 height=168 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  18. </tr></td>
  19. <!--all content-->
  20. <tr><td width="780" valign="top"><table width="780" height="410" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff"><tr valign="top">
  21. <!--left skyscraper-->
  22. <td width="125" align="center"><div align="center">
  23. <IFRAME src="adv-skyscrapper-left.php" width=120 height=600 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  24. </div></td>
  25. <!--content-->
  26. <td width="480"><table width="480" height="500" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff"><tr valign="top">
  27. <td align="center">1/2
  28. </td></tr></table><BR>
  29. <!--234 banners-->
  30. <table width="480" height="60" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff"><tr valign="top">
  31. <td width="234" align="center"><div align="center">
  32. <IFRAME src="adv-halfbanner-left.php" width=234 height=60 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  33. </div></td>
  34. <td width="234" align="center"><div align="center">
  35. <IFRAME src="adv-halfbanner-right.php" width=234 height=60 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  36. </div></td></tr></table>
  37. <!--right skyscraper-->
  38. </td><td width="125" align="center"><div align="center">
  39. <IFRAME src="adv-skyscrapper-right.php" width=120 height=600 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  40. </div></td></tr></table></td></tr>
  41.  
  42. <tr><td width="780" valign="top">
  43. <IFRAME src="footer.htm" width=780 height=75 FRAMEBORDER=0; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  44. </td></tr></table>           
  45.  
  46. </body>
  47. </html>


Reply With Quote
  #2  
Old May 5th, 2005, 07:41 PM
sliver's Avatar
sliver sliver is online now
Moderator
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: WI, USA
Posts: 902 sliver User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 43 m 54 sec
Reputation Power: 2
Send a message via AIM to sliver Send a message via XFire to sliver
RE: "You codded it in dream weaver didn't you"

Same thing happened to me. I had a guy do a layout and I ended up spending a good few hours making it readable/editable.

Reply With Quote
  #3  
Old May 6th, 2005, 03:28 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,121 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 43 m 44 sec
Reputation Power: 3
Send a message via AIM to LLX Send a message via Yahoo to LLX
RE: "You codded it in dream weaver didn't you"

even inproved it a bit

php Code:
Original - php Code
  1.  
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  3. <html>
  4. <head>
  5. <title>Nanny-Online.com</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <link href="text.css" rel="stylesheet" type="text/css">
  8. </head>
  9.  
  10. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  11. <!--Header-->
  12. <table width="950" border="0" cellspacing="0" cellpadding="0"><tr><td width="780" valign="top">
  13. <IFRAME src="<?=$header;?>" width=780 height=125 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  14. </tr></td>
  15. <!--Nav-->
  16. <tr><td width="780" valign="top">
  17. <IFRAME src="<?=$navigation;?>" width=780 height=168 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  18. </tr></td>
  19. <!--all content-->
  20. <tr><td width="780" valign="top"><table width="780" height="410" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff"><tr valign="top">
  21. <!--left skyscraper-->
  22. <td width="125" align="center"><div align="center">
  23. <IFRAME src="<?=$skyscrapperleft;?>" width=120 height=600 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  24. </div></td>
  25. <!--content-->
  26. <td width="480"><table width="480" height="500" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff"><tr valign="top">
  27. <td align="center"><?include ($content);?>
  28. </td></tr></table><BR>
  29. <?
  30. if ($halfbannerleft != ''  && $halfbannerright != ''){
  31. ?>
  32. <!--234 banners-->
  33. <table width="480" height="60" border="0" cellpadding="0" cellspacing="10" bgcolor="#f2f2ff"><tr valign="top">
  34. <td width="234" align="center"><div align="center">
  35. <IFRAME src="<?=$halfbannerleft;?>" width=234 height=60 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  36. </div></td>
  37. <td width="234" align="center"><div align="center">
  38. <IFRAME src="<?=$halfbannerright;?>" width=234 height=60 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  39. </div></td></tr></table>
  40. <?
  41. }
  42. ?>
  43. <!--right skyscraper-->
  44. </td><td width="125" align="center"><div align="center">
  45. <IFRAME src="<?=$skyscrapperright;?>" width=120 height=600 FRAMEBORDER="0"; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  46. </div></td></tr></table></td></tr>
  47.  
  48. <tr><td width="780" valign="top">
  49. <IFRAME src="<?=$footer;?>" width=780 height=75 FRAMEBORDER=0; MARGINWIDTH=0; MARGINHEIGHT=0; SCROLLING="no"></IFRAME>
  50. </td></tr></table>           
  51.  
  52. </body>
  53. </html>

Reply With Quote
  #4  
Old May 6th, 2005, 06:06 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: "You codded it in dream weaver didn't you"

I go a step further when Im nesting tables, and I, for one think this is a good rule of thumb. Notice, the structure is clearly elegible, despite the fact that I have placed no comments in the code. You can see exactly where I am going with the layout without going cross eyed. This also comes in handy when you roll your own templating system in PHP. You can see EXACTLY whats happening, should you have flaws in your layout.

php Code:
Original - php Code
  1.  
  2. <html>
  3. <head>
  4. </head>
  5. <body>
  6. <table>
  7.   <tr>
  8.     <td>
  9.       <table>
  10.         <tr>
  11.           <td></td>
  12.         </tr>
  13.       </table>
  14.     </td>
  15.   </tr>
  16. <table>
  17. </body>
  18. </html>

Reply With Quote
  #5  
Old June 9th, 2005, 03:58 PM
Jacson Jacson is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 105 Jacson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: "You codded it in dream weaver didn't you"

*** Nevermind, Don't read this. Lol. I am wading thru a 99-post thread about the suggested editors (also on this page) ***

So what code editor do people use?
There must be a more efficient method than the one I am using.

LLX's example when using Dreamweaver looks alot like my code until I spend loads of time manually formatting until it looks like nawlej's example.

What about template makers? I am not impressed by what I have seen, but am uneducated and inexperienced.

I have been using Dreamweaver, VS Studio and notepad. Plus Word, Excel -- anything that helps.

While learning I want full control on code but would like some environment that consistently formats code, allows insertion of snippets from my expanding library (like Dreamweaver).

Reply With Quote
  #6  
Old June 10th, 2005, 09:40 AM
moon moon is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 356 moon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 56 m 39 sec
Reputation Power: 2
Send a message via Yahoo to moon
RE: "You codded it in dream weaver didn't you"

i use ultra edit for my web programming
and i prefer nawleg way of indentation, coz it is more readable.

Note, having a change log and following coding convention, and writing comments depending on ur org, is also very important, epecially when u involve in one of the dev team. So, if u r a way from ur company, others can take over ur work easily.