Solved

Indenting in Code View

Posted on 2004-04-07
10
621 Views
Last Modified: 2010-04-25
Below is a sample of what I see looking at the code in Dreamweaver Ultradev 4.01 - obviously unmanagable.  How can I get it formatted into a legible form w/ the expected indentation?

I've already tried Commands -> Apply source formatting and this does not appear to do anything at all.

In Edit -> Preferences -> Code Format I have checkmarks next to all of the 'Indent' options and I have no Automatic Wrapping selected.

I've just installed a few days ago on WinXP Pro machine.  Previously was using on Win2k machine and had no problems.  

Is this an XP compatibility problem?  Do I have a setting screwed up?  I'm going nuts here - any help would be much appreciated!

What I want:
---------------------------
<table>
   <tr>
      <td>Content
      </td>
  </tr>
</table>

What I have:
---------------------------
<tr> <td height="25" valign="MIDDLE" COLSPAN="12" BGCOLOR="#c5d8f0" CLASS="normaltextlarge" ALIGN="CENTER">Disposable
Commitment</td></tr><tr VALIGN="MIDDLE"><td height="25" WIDTH="26">&nbsp;</td><td ALIGN="CENTER" COLSPAN="2">&nbsp;</td><td ALIGN="CENTER" WIDTH="54" CLASS="normaltextxtrasmall">Current<BR>Units</td><td WIDTH="54" ALIGN="CENTER" CLASS="normaltextxtrasmall">Commit<BR>Units</td><td ALIGN="CENTER" WIDTH="54" CLASS="normaltextxtrasmall">Base<BR>Price</td><td ALIGN="CENTER" WIDTH="54" CLASS="normaltextxtrasmall">Fee
Per<BR>Unit</td><td WIDTH="54" ALIGN="CENTER" CLASS="normaltextxtrasmall">Net<BR>Price</td><td ALIGN="CENTER" WIDTH="75" CLASS="normaltextxtrasmall">Extended<BR>Base
0
Comment
Question by:frodoman
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 35

Expert Comment

by:mrichmon
ID: 10779037
One trick that may help is to go into design view and change some text - and even change it back.  This often causes DW to give some basic formatting to the code view.
0
 
LVL 14

Accepted Solution

by:
Esopo earned 500 total points
ID: 10780683
Seems to me there's something wrong with your DW. I can't think of a way to make it autoindent, I tried a few things in my MX, none worked.

I suggest you download some software to do the reformatting of the html, an example:
http://download.paessler.com/download/aspbeautify.zip (200k)

From the site:
ASPBeautify beautifies the server based VB Script source code of Active Server Pages (ASP) and HTML Files by reformatting the source code (code indention).
It features VBScript- and HTML-indention, automatic clipboard and multiple file beautifying (batch).
- The site: http://www.paessler.com/products/freeware
You can also find it here: http://www.ezgoal.com/house/allfiles.asp?L=A&Order=&Sort=&Step=237&computer+software

I haven't tried this software, exercise caution.

Best regards,

Esopo.
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 10783306
You can also try textpad at textpad.com  free download and colorcodes tags for easy coding.  It  autoformats almost anything that I have opend with it.


textpad.com
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 42

Author Comment

by:frodoman
ID: 10783959
Thanks for the comments so far.  I'm aware of other editors but am hoping for a DW fix.

I'm not asking for functionality that isn't there because everything worked fine on my Win2k machine.  Unfortunately I wasn't the one that did the original install there so I don't know if there were settings changed or what.  I did do the install when I moved to WinXP and I'm thinking that there is something configured incorrectly.

Anyone have any ideas?
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10784179
Well, often you can get results like this when a file is transferred from say a Mac operating system to a windows one using binary mode instead of ASCII - or even if you transfer from a web host that is not windows using Binary mode transfer.
0
 
LVL 42

Author Comment

by:frodoman
ID: 10784228
Good thought but that's not it.  

If I open up a file in notepad the old indented formatting is retained.  When I open it in DW it's fine until I start moving stuff around in design view - it's then that DW screws it up.
0
 
LVL 1

Expert Comment

by:tintedfish
ID: 10786297
There are a couple of known compatability issuses with Ultradev and XP. Have a search through he macromedia forums / knowledgebase, I'm fairly sure I have read of this very problem in there. and its solution.
0
 
LVL 42

Author Comment

by:frodoman
ID: 10786381
I have searched the forums and didn't find anything.  If you can point me to a link I'll be happy to give you the points!
0
 
LVL 1

Expert Comment

by:tintedfish
ID: 10786565
Cant find it just now, will have a look later.

Have you tried setting |edit|preferences|code format| indent off, then applying |commands|apply source formatting| to remove all formatting. Save the file. Then switch indent back on  (space and tab size set, overrides off?) and reapplying source formatting?
0
 
LVL 42

Author Comment

by:frodoman
ID: 10805554
Thanks to all for your efforts but unfortunately none of the suggestions have solved the problem.  Looks like I'm going to be stuck using a 3rd party editor for now...
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
dreamweaver cs6 keep getting error 2 msg 16 393
Setting up PHP server 3 209
How Can I Get A Back Button To Work On My Website? 1 128
Adobe Dreamwever CS5.5 - mage sites help needed. 1 126
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question