ThrillSeeker
asked on
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
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
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.
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.
ASKER
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
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
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("fldB ackgroundC olor")%>">
<tr>
<td style="font-size:<%=rsForm at("fldFon tSize")%>p t;font-wei ght:<%=rsF ormat("fld FontWeight ")%>">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("fldBackgroun dColor")) > 0 THEN
fldBackgroundColor = rsFormat("fldBackgroundCol or")
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("fldFontWeigh t")) > 0 THEN
fldFontWeight= rsFormat("fldFontWeight")
ELSE
fldFontWeight= "normal"
END IF
%>
<table bgcolor="<%=fldBackgroundC olor%>">
<tr>
<td style="font-size:<%=fldFon tSize%>pt; font-weigh t:<%=fldFo ntWeight%> ">This is the text</td>
</tr>
</table>
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("fldB
<tr>
<td style="font-size:<%=rsForm
</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("fldBackgroun
fldBackgroundColor = rsFormat("fldBackgroundCol
ELSE
fldBackgroundColor = "#FFFFFF"
END IF
'If font size is null then sets it to 10
IF LEN(rsFormat("fldFontSize"
fldFontSize= rsFormat("fldFontSize")
ELSE
fldFontSize= "10"
END IF
'If fldFontWeight is null then sets it to normal
IF LEN(rsFormat("fldFontWeigh
fldFontWeight= rsFormat("fldFontWeight")
ELSE
fldFontWeight= "normal"
END IF
%>
<table bgcolor="<%=fldBackgroundC
<tr>
<td style="font-size:<%=fldFon
</tr>
</table>
ASKER
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
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
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.
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
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
ASKER
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
A search for online wysiwig HTML editor will bring up loads of options!
Thanks
Marc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
zombeen