Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 480
  • Last Modified:

HTML Generator for a form field

I have a database storing various informtaion that is displayed on the page, now for one line or so it is fine, but i want to give th use more flexibility over what the text looks like.

Is there an extension or something i can use to make the process easier.  I am running an access 2002 database with asp pages. I know it can be done because the web wiz guide guestbook and forums use it.  Even simple things like adding bold, center and underline italic would be start.

My clients have no knowledge of HTML at all and educating them is out of the question.  I can preserve whitespace ok, just this little extra i need, thanks for you help.

To get a better idea of what i mean check out the guestbook sign page here:

http://www.webwizguide.com/guestbook/sign.asp?PagePosition=1

or more complex:

http://www.wa.vanguardia.co.uk/images/forum.gif

Thanks for your time

Marc
0
ThrillSeeker
Asked:
ThrillSeeker
1 Solution
 
zombeenCommented:
log on to www.planet-source-code.com and search for "html formatters" or like .. i 'm sure you will find a number of scripts and you can use one according to your needs..

zombeen
0
 
webwomanCommented:
Actually, you can't. Not with Access. It doesn't store the text in a field that way. You can't even make it bold/italic in Access.

Go ahead, try it. Anything you do for formatting is applied to the ENTIRE field, not particular characters.

So it's not a limitation of ASP (though it's a limition of the form fields to some extent), it's a limitation of ACCESS.

>>I know it can be done because the web wiz guide guestbook and forums use it.  

But I doubt they're using Access, and I'd bet $$$$ that they're using a formatting script BEFORE they store it in the database. I would.
0
 
ThrillSeekerAuthor Commented:
Dont meant to be rude, maybe my question was not clear enough.  

I need to find some sort of formating script. I know the limitations of the access database and know for a fact (as i use it) that the data is stored in the database as HTML.  What i need is the script that writes the html for you as my client has no HTML knowlegde at all.

The public domain HTML editor is a great extension but is far too complicated and invloved.

Thanks

Marc
0
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
WebDevAngCommented:
ThrillSeeker,

If you add certain fields to your database tables such as:

fldBackgroundColor
fldFontSize
fldFontWeight

Then you can store information.

So if you have
fldBackgroundColor = "#000000"
fldFontSize="10"
fldFontWeight="bold"

Then you could add the following to your page:
(And assuming you can get the recordset from the db to the page)

<table bgcolor="<%=rsFormat("fldBackgroundColor")%>">
<tr>
<td style="font-size:<%=rsFormat("fldFontSize")%>pt;font-weight:<%=rsFormat("fldFontWeight")%>">This is the text</td>
</tr>
</table>


A better example would probably be:

<%
'Get your recordset here
DIM fldBackgroundColor, fldFontSize, fldFontWeight
'If no background was set then assures it is set to white eliminating nulls and errors
IF LEN(rsFormat("fldBackgroundColor")) > 0 THEN
fldBackgroundColor = rsFormat("fldBackgroundColor")
ELSE
fldBackgroundColor = "#FFFFFF"
END IF
'If font size is null then sets it to 10
IF LEN(rsFormat("fldFontSize")) > 0 THEN
fldFontSize= rsFormat("fldFontSize")
ELSE
fldFontSize= "10"
END IF

'If fldFontWeight is null then sets it to normal
IF LEN(rsFormat("fldFontWeight")) > 0 THEN
fldFontWeight= rsFormat("fldFontWeight")
ELSE
fldFontWeight= "normal"
END IF
%>
<table bgcolor="<%=fldBackgroundColor%>">
<tr>
<td style="font-size:<%=fldFontSize%>pt;font-weight:<%=fldFontWeight%>">This is the text</td>
</tr>
</table>
0
 
ThrillSeekerAuthor Commented:
Again off track.

What i want is the ability to use something along the lines of the PhBB code generator for one form field only.  What i want the user to be able to do is click on the bold button and the <B></B> tags are inserted into the the field so the user only has to put the text they want in bold in between the tags.  Same for italics, font and alignment.  Also the ability to add hyperlinks, imagae tags and colour would be nice.  I dont want to format the whole page, just the text that is going into the field.  Which will then be stored and retrieved to be displayed on part of another page.

Marc
0
 
webwomanCommented:
That's all well and good, but there ISN'T any form input that will do this. NONE. If you have a standard form field, which is what you NEED to have, you can only have straight ASCII text. NO formatting at all.
0
 
zenlion420Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: webwoman {http:#8128858}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

zenlion420
EE Page Editor
0
 
ThrillSeekerAuthor Commented:
I have found the answer to my question!!  Its an online WYSIWIG HTML editor!!   There is an asp.NET one that can store its HTML in a database field and upload any pictures necessary.

A search for online wysiwig HTML editor will bring up loads of options!

Thanks

Marc
0
 
GhostModCommented:
PAQed, with points refunded (125)

GhostMod
Community Support Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now