Solved

FP HTML editor keeps inserting spaces (&_nbsp_;)

Posted on 2002-06-06
9
170 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
ID: 7060539
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
ID: 7060548
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
ID: 7061746
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:tonejunkie
ID: 7061762
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
 
LVL 6

Accepted Solution

by:
jdfulton earned 80 total points
ID: 7061935
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
ID: 7069628
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
ID: 7069629
Since there is no solution, there is no answer.
0
 
LVL 6

Expert Comment

by:jdfulton
ID: 7069722
tonejunkie,

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

Expert Comment

by:Wrdslngr
ID: 7069738
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

776 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