Solved

FP HTML editor keeps inserting spaces (&_nbsp_;)

Posted on 2002-06-06
9
169 Views
Last Modified: 2013-12-24
Hi,

I have a DB result set from which I pull out a number, like this:  <td><%=rs("Num")%>&nbsp;</td>
I need to get rid of the blank space (&_nbsp_;) in that cell which FrontPage automatically inserts after I save the file.  Even though I have the "Preserve existing HTML" option checked.

Any help?
Thanks in advance.
0
Comment
Question by:tonejunkie
  • 3
  • 3
  • 3
9 Comments
 
LVL 1

Expert Comment

by:Wrdslngr
Comment Utility
The only way I've ever been able to eliminate the FrontPage trash code is to finish the site, then do a global replace, replacing &nbsp; with nothing in the lower box.  If you select ALL PAGES and FIND IN HTML, the replace tool will go through the entire site and eliminate the trash (at least until the next time you open that page).  ;-)~~
0
 
LVL 1

Expert Comment

by:Wrdslngr
Comment Utility
Before I forget to say so...

Always make sure you have published a copy of the site locally prior to doing a global replace, just in case.  ;-)
0
 
LVL 6

Expert Comment

by:jdfulton
Comment Utility
tonejunkie,

Create a macro using this code.  This macro searches for the <TD> tag, removes the
&nbsp; (space), and sets the height of the cell at 9.  This should take care of the problem.


Sub TableDeSpacer()
  With ActiveDocument
  For i = 0 To .all.Length - 1
  If UCase(.all(i).tagName) = "TD" Then
  If .all(i).innerHTML = "&nbsp;" Then
  .all(i).Height = 9
  End If
  End If
  Next
  End With
  End Sub
0
 
LVL 1

Author Comment

by:tonejunkie
Comment Utility
I guess I'm looking for more of an option in FrontPage settings which would disable any automatic code changes.  And "Preserve existing HTML" obviously doesn't work.  But the only thing I've come up with was to finish the page, and then open it in Notepad to get rid of the extra crap FrontPage throws in.  Which is almost as annoying as having to code around it.

What a waste of a product this thing is.  :)
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 6

Accepted Solution

by:
jdfulton earned 80 total points
Comment Utility
The reason why Frontpage does this is to show the table outlines in the design view.  I know it does suck, I usually don't have a problem with the spacing.  All you can do is work around it or not use it.  The macro does work well so give it a shot.
0
 
LVL 1

Author Comment

by:tonejunkie
Comment Utility
Well I need some of the spaces to stay in, but I need to get rid of some.  So I guess there is no solution to this question.
0
 
LVL 1

Author Comment

by:tonejunkie
Comment Utility
Since there is no solution, there is no answer.
0
 
LVL 6

Expert Comment

by:jdfulton
Comment Utility
tonejunkie,

You can use the macro in the same way to add spaces.
0
 
LVL 1

Expert Comment

by:Wrdslngr
Comment Utility
Just guessing, but if you're looking for a way to get an answer that will FIX FrontPage problems with trash code...you should call Microsoft.  All we can do as end users is recommend work-arounds we've had to use ourselves.  It looks like the Macro will work, I know the replace option works to accomplish the same thing in a different way...but we can't fix the original problem with the software.  Sorry.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now