Let me check if I get you right. So, you are actually trying
to save your HTML by parts into different rows in your db. After
that, you extract all the rows and use the cfloop to display all
the rows, which will sum the parts of your HTML. You should
consider 2 things:
1.) Basing on your query pagina_inhoud, I don't see any ORDER
BY clause. I think when your query doesn't have an ORDER BY,
sometimes row 2 can come first before row 1. In this case, there is
a possibility that your HTML might be displayed incorrectly. I
think you should consider the ordering/sorting of your rows when
your data is returned from db. I mean, you should put another field
which will determine the order/sort of the returned rows so as not
to misplace some parts of your HTML when outputting the data.
2.) Another thing is the way you output your data. The
problem is when there are spaces before and after your
<cfoutput> tag as shown below:
[spaces here]
<cfoutput>#pagina_inhoud.inhHtml#</cfoutput> [spaces
here]
The format above can also cause your HTML code to have spaces
in between. In order to avoid this, make sure there are no spaces
on those part of your code. To do this, use cfsetting tag in your
output as shown below.
<cfsetting enableCFoutputOnly = "yes"> <!--- this
will block any HTML output(including spaces) after this tag and
those that are outside the cfoutput tags --->
<cfloop
query = "pagina_inhoud"
startRow = "1"
endRow = "#pagina_inhoud.RecordCount#">
<cfoutput>#pagina_inhoud.inhHtml#</cfoutput>
</cfloop>
<cfsetting enableCFoutputOnly = "no"> <!--- change
back to "no" to make sure that HTML outputs after this tag are
displayed --->