Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access and CF

Status
Not open for further replies.

GUJUm0deL

Programmer
Jan 16, 2001
3,676
US
Hiya, have an interesting question here. I use MS Access dB, is it possible to have the text from the fieldnames be formatted with HTML when I output the results??

As of now, I input HTML tags in the feild and <cfoutput> displays that text formatted, but this method can take A LONG time. I was wondering if CF had a built in function (or any technique) that can allow the text in a field to be formatted with the <p>, <color>, <a>, etc. tags.

Thanks.

[sub]
____________________________________
Just Imagine.
[sub]
 
coldFussion doen't have anything internally to do that but i use and am very happy with Site Objects soEditor Pro for that type of textbox feature.. for a demo go here

or there is also
FCKEditor :
HTMLArea 3.0 :


here is a link to a whole bunch of ediorts....

------------------------------------------------------------------------------
brannonH
if( !succeed ) try( );
 
The above mentioned FCKEditor works quite well except that sometimes it asks for Office to be installed, not entirely sure why...

I use it on many of my websites.. so convenient for the owner of the site to build a page in a word-processor interface that they're familiar with.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Hey, thanks for the links, I looked at FCKeditor but how can that help in my case?? What I wanna do is type in plain text in the MSAccess dB, then display that text onscreen (via <cfoutput>) but a certain way with HTML tags.

As of now, I am using DW to format the text (with <b>, <font>, <a> tags and whatnot), is there a better (and much faster) way??

Thanks.

[sub]
____________________________________
Just Imagine.
[sub]
 
Well maybe give us some examples.. like some text and then how you would like it to be formatted? I'm not really sure exactly what it is you want here.

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
if you type the text in the editors (web based ) then insert into database it will already have the html stuff in their.... bold, underline, paragraph, etc...

------------------------------------------------------------------------------
brannonH
if( !succeed ) try( );
 
Hey guys, lemme see if I can explain it another way...ok, here goes: as of now, I use DW to format my page, you know have the font family, size, color defined, create the links, use <p> tags or <br> tags, all in a attempt to make the page look like any well-formated webpage, now after I do that, I copy and paste a specific paragraph into the dB field and using CF output display that fields "value" onto the screen (a lot like this page's results are all pulled from the dB, but I had to format it first then paste it into the field. This can be a pain in the arse when you have a very large site. I was wondering if there was an easier way to do this.

Does this make sense??

[sub]
____________________________________
Just Imagine.
[sub]
 
Here is a sample of your code

Code:
<table width="470" border="0" align="center">
  <tr align="left" valign="middle"> 
      <td colspan="3"><font color="cc0000" size="2" face="Arial, Tahoma, Verdana"><strong>Name:</strong></font><font size="2" face="Arial, Tahoma, Verdana"> BeholdersEye</font></td>
  </tr>
  <tr align="left" valign="middle"> 
    <td width="183"><div align="left"><font size="2" face="Arial, Tahoma, Verdana"><a class="dls" href="wallpapers\BeholdersEye.bmp" target="_blank">View</a></font> | <font color="bda94c" size="2" face="Arial, Tahoma, Verdana"><a class="dls" href="wallpapers\BeholdersEye.zip">Download</a></font></div></td>
    <td width="89">&nbsp;</td>
    <td width="184" align="right" valign="middle"><div align="center"><font color="cc0000" size="2" face="Arial, Tahoma, Verdana"><strong>Browser:</strong></font><font size="2" face="Arial, Tahoma, Verdana">&nbsp;N/A</font></div></td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan="4"> <div align="justify"><font color="cc0000" size="2" face="Arial, Tahoma, Verdana"><strong>Description:</strong></font><font color="bda94c" size="2" face="Arial, Tahoma, Verdana"> </font><font size="2" face="Arial, Tahoma, Verdana"> Sci-fi wallpaper</font><font color="bda94c" size="2" face="Arial, Tahoma, Verdana"><font color="cccccc"><br></font></font></div></td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan="4"><div align="center">------------------------------------------------------------------------------</div></td>
  </tr>
</table>
first off your table is not accurate....
1st row has 3 columns
2nd row has 3 columns
3rd row has 4 columns
4th row has 4 columns
That doesn't add up.....

Second why not use stylesheets (CSS)

your code would look like this

Code:
<table width="470" border="0" align="center">
  <tr align="left" valign="middle"> 
      <td colspan="3" class="text"><span class="title">Name:</span> BeholdersEye</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td width="183" class="text"><a class="dls" href="wallpapers\BeholdersEye.bmp" target="_blank">View</a> | <a class="dls" href="wallpapers\BeholdersEye.zip">Download</a></td>
    <td width="89">&nbsp;</td>
    <td width="184" align="right" class="text"><span class="title">Browser:</span> N/A</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan="3" class="text"><span class="title">Description:</span> Sci-fi wallpaper</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan="3" align="center">------------------------------------------------------------------------------</td>
  </tr>
</table>

------------------------------------------------------------------------------
brannonH
if( !succeed ) try( );
 
Here see what some CSS would do.

Code:
<style>
a:link {
	color:Blue;
}
a:visited {
	color:Green;
}
a:hover {
	color:cc0000;
}
a:active {
	color:black;
}

table {	
	font-family: Arial, tahoma, Verdana;
	font-size: 12px;
	font-wieght:400;
	font-color: black;
}

th {
	color: #cc0000;
	font-wieght: 700;
}

.red {
	font-weight: 700;
	color:cc0000;
}

</style>
  
   
<table width="470" border="1" align="center">
  <tr align="left" valign="middle"> 
    <th width="79">Name:</th>
    <td colspan="2">BeholdersEye</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan=2> <div align="left"> <a href="wallpapers\BeholdersEye.bmp" target="_blank">View</a>&nbsp;|&nbsp;<a href="wallpapers\BeholdersEye.zip">Download</a></div></td>
    <td width="337" align="right" valign="middle"> <div align="center"><span class="red">Browser:</span>&nbsp;N/A</div></td>
  </tr>
  <tr align="left" valign="middle"> 
    <th>Description:</th>
    <td colspan="2">Sci-fi wallpaper</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan="3"> <div align="center">------------------------------------------------------------------------------</div></td>
  </tr>
</table>

<cfoutput query="myquery" datasource="application.dsn">
<table width="470" border="1" align="center">
  <tr align="left" valign="middle"> 
    <th width="79">Name:</th>
    <td colspan="2">#Name#</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan=2> <div align="left"> <a href="#view_Link#" target="_blank">View</a>&nbsp;|&nbsp;<a href="#download_Link#">Download</a></div></td>
    <td width="337" align="right" valign="middle"> <div align="center"><span class="red">Browser:</span>&nbsp;N/A</div></td>
  </tr>
  <tr align="left" valign="middle"> 
    <th>Description:</th>
    <td colspan="2">#description#</td>
  </tr>
  <tr align="left" valign="middle"> 
    <td colspan="3"> <div align="center">------------------------------------------------------------------------------</div></td>
  </tr>
</table>
<br>
</cfoutput>

First table is example without CF and 2nd is with CF code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top