|
Richard_D wrote:
but it's easy enough (and cheaper ) to roll your own.
Yeah we tried to roll our own for a project once (I had three days in which to do it though which bites.)
The basics are all pretty easy to do using IE. It is when you get to more complex features, such as applying CSS classes, that things start to unravel (and which the RichTextBox seems to do well.)
Also we need to output XHTML compliant code, though I recently figured out I can pipe-line HTML Tidy into the solution to get this done.
There were lots of niggly issues we ran into when doing our own, which RichTextBox seems to get around.
Richard_D wrote:
http://www.trinet.co.uk/trinet/feedback.asp[^]
Looks great. How can we make use of it in a commercial project? (not for re-sell but a bespoke CMS system for our clients)
i.e. What are your licensing terms?
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
Simon Walton wrote:
"You come across a lot of people who call themselves realists, when they are actually pessimists attempting to look intelligent."
|
|
|
|
|
Paul Watson wrote:
Also we need to output XHTML compliant code,
I can't guarantee that it would be 100% XHTML compliant, but it does have a good go. The tags and attribute names will be in lower case, attribute values will be quoted, all tags will be closed, and all tags will be properly nested.
Paul Watson wrote:
What are your licensing terms?
$80 (US), or £57 (GBP), including source code.
The current properties are below. I keep "playing" with it, so it might get more features!
Properties:
- formname
- Name of the form element
- width
- Css width for this element
- height
- Css height for this element
- value
- HTML content. If not specified, the value is taken either from the element specified in formname (if it exists), or the innerHTML of the element.
- usebr
- True to use <br /> on Enter. False (or not specified) to use <p>
- cssurl
- Full Url to the Css file to use
- includeSource
- Allow access to HTML source?
- includeSpelling
- Allow user to run spell-checker?
- includeTable
- Allow user to insert tables?
- includeSymbol
- Show a drop-down list of symbols
- includeCurrSymbol
- Include currency symbols
- includeTMSymbol
- Include TM, (c), etc
- includeFmtSymbol
- Include formatting symbols
- includeAccentSymbol
- Include accents
- includeMathSymbol
- Include mathematical symbols
- includeArrowSymbol
- Include arrows
- limit
- Maximum number of characters to allow (0 or not specified = unlimited
- imgdir
- Image folder for toolbars
- basepath
- Base Url for images - use blank for current
Standard Inserts:
If includeSymbol = true, standard inserts can be added by including the following within the element:
<div class='HTML_INSERT' style='display:none;' text='[CAPTION OF INSERT]'<
[HTML to insert]
</div>
Client Side Events:
All events have the following properties:
- srcElement
- This element
- srcHTML
- The HTML editor
- returnValue
- Set to false to prevent processing
Events:
onbeforeparastyle
Fires before applying a paragraph style
- newStyle
- The style to be applied
onbeforefontsize
Fires before changing the font size
- newSize
- The new size
onbeforefontname
Fires before changing the font name
- newFont
- The new font
oninserttable
Fires before inserting a table
- tableAttributes
- Attributes for the table
- showDialog
- Return false to insert without prompting
onsetcolor
Fires before setting the foreground or background colour
- mode
- BG or FG
- newColor
- Return a colour
- showDialog
- Return false to set the colour without prompting
- dialogUrl
- Url of the colour dialog
- dialogAttributes
- Attributes for the colour dialog
oncheckspelling
Fires before the spell-checker window is opened
- dialogUrl
- Url to the spell-checker
- dialogWidth
- Width of the window
- dialogHeight
- Height of the window
oninsertimage
Fires before inserting an image
- showWarning
- Return false to prevent the warning message
- showDialog
- Return false to prevent the Url prompt
- imageUrl
- Url of the image
oninsertlink
Fires before inserting a hyperlink
- showDialog
- Return false to prevent the Url prompt
- Url
- Url for the link
oninsertsymbol
Fires before inserting a symbol
- symbol
- Symbol to insert
Example
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="htmleditor_ctrl_xp.css" />
<script language="javascript">
<!--
function test() {
alert(document.getElementById("test").value);
}
function testLink() {
event.showDialog = false;
event.Url = "http://www.codeproject.com/";
}
</script>
</head>
<body>
<div
style="width:100%; behavior:url(htmleditor.htc);"
id="testHTML" formname="test"
includeSymbol="1"
includeAccentSymbol="0" includeArrowSymbol="0"
includeMathSymbol="0" includeFmtSymbol="0"
usebr="1" oninsertlink="testLink()"
>
<!--The form element. The editor will take it's value from this.-->
<textarea name="test" id="test" rows="5" cols="50">
<p><em>Test</em> of HTML HTC</p>
</textarea>
<!--The easiest way to check whether the editor was run from the server:-->
<input type="hidden" name="test_IsHTML" value="0" />
<!--A custom insert.-->
<div class="HTML_Insert" style="display:none;" text="Disclaimer">
<hr size="1" color="#eeeeee" noshade />
<span>Well, this works then!</span>
</div>
</div>
<button onclick="test();">Test</button>
</body>
</html>
IE5+ users will get the editor, everyone else will get the standard text-box.
|
|
|
|
|
Alternatively, if that's too much, this[^] article might be of interest.
|
|
|
|
|
Is it possible for a web browser to access the users serial port to receive data from a peripheral to be used in a website? Such as having a small barcode scanner with barcodes scanned in it, the user then goes to a website to order the items scanned, and the webite reads the data from the scanner and compares the scanned items with a central database. If so, what technology?
|
|
|
|
|
Do not use just a web browser. Create a separate app that will scan barcodes, and then send the data using eg HTTP protocol.
You can also put a web browser control in your app, or create a plug-in for IE!
If your clients get barcodes scanners, barcodes, they can also get an additional app!
Ñ There is only one MP Ð
|
|
|
|
|
Hello,
i can get the date of the last modify of a document using document.lastModified. But is it possible to get the last modify date of any file using a function plus a pointer to the file?
The point is, i want show the user the upload time of a downloadable file.
Thanks,
Dominik
|
|
|
|
|
Use "Scripting.FileSystemObject" ActiveX scripting,
MSDN reference
function ShowFileAccessInfo(filespec)
{
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec);
s = filespec.toUpperCase() + "<br>";
s += "Created: " + f.DateCreated + "<br>";
s += "Last Accessed: " + f.DateLastAccessed + "<br>";
s += "Last Modified: " + f.DateLastModified;
return(s);
}
And I swallow a small raisin.
|
|
|
|
|
Is it possible to do this without ActiveX, in pure JavaScript?
|
|
|
|
|
Wouldn't there be some problems if Javascript itself was able to access the FileSystem ? This would be a security flaw.
If you can use document.lastModified for the current web page, there is no magics behind, that's because the web server puts these info in the HTTP headers.
As a matter of fact, you may use Web-DAV (an extension of HTTP) for what you need, but that brings us very far. See MS SharePoint.
And I swallow a small raisin.
|
|
|
|
|
Well, you are right, if JavaScript could access the filesystem this really could be a security flaw. I will use your ActiveX version.
Thanks!
|
|
|
|
|
Hi all,
I am creating an automation COM Object for ASP. From an ASP point of view, which is the best threading model to use, FREE or BOTH?
Thanks,
James
Drinking In The Sun
Forgot Password?
|
|
|
|
|
Can't tell you wich is the best, but BOTH worked fine for me. Maybe it also depends on what kinda project you are doing
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
I'm making BOTH as well. I think thats the safest. In either case, switching to FREE or Apartment at a later stage will not be difficult.
Thanks,
James
Drinking In The Sun
Forgot Password?
|
|
|
|
|
[James Pullicino] wrote:
I'm making BOTH as well
There are advantages and disadvantages to both, depends which adv. are important to you and your application, but I would use BOTH if I was developing the component.
Soliant | email
"the result is that VC7 is the only compiler to generate optimized MSIL" - Stanley Lippman
|
|
|
|
|
I'm developing a web site that has reports which will be billable to the user. So, in this case we need to write to the database user login and logout times. It means session start time and end time.
We are using Oracle 9iAS with Apache 1.3.19 as the http server on Windows 2000. Database is Oracle 8i.
All these days we tried to do it..but could not find a good solution. We tried it with JavaScript but it does not work on some browsers.(Specially on Mozilla 1.0).
Do you know anyway of doing this. If so please let me know it will be great help.
Thank you,
Yamsy
|
|
|
|
|
I'm trying to connect to a MySQl DB using perl DBI.
I'm getting the following error. (running on WinXP, activeperl 5.6.1, MySQL port is 3306)
DBI->connect(database=mysql;host=localhost;port=3306) failed: Can't create IP socket (10106) at C:/Perl/site/lib/DBI.pm line 494
Any clue where to start solving this. I pretty clueless regarding MySQL and DBI.
Thanks!
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
Hi,
I've created a user Control with contains a DBGrid. I include this user control in a webform. This webform got some fields (textboxes) that I want to validate using, for example the required field validator.
The problem is when I try to insert or modify a row in my dbGrid (which is in the user control...) I cannot save my changes unless all the required field of my webform are filled in.
How can I deactivate the field validator trigger for my user control (or at least when I validate a row in my DBGrid) - knowing the fact that when you validate a change in the dbgrid, you generate a postback.
Many thanks in advance !!!
|
|
|
|
|
Hi, pals!
I want to get detailed information about each object
and each method in Javascript. Can you tell me where
can I find a Javascript reference book?
Cheers,
George
|
|
|
|
|
IMHO the best reference you'll get is from ECMA itself : ECMA javascript.
Then of course you have the Microsoft specific implementation of javascript : JScript. See MSDN.
You also have Netscape's.
And I swallow a small raisin.
|
|
|
|
|
|
Get Danny Goodman's "Javascript Bible" it is very indepth and covers both IE and Netscape flavors of javascript.
Soliant | email
"the result is that VC7 is the only compiler to generate optimized MSIL" - Stanley Lippman
|
|
|
|
|
Hi,
In my htm page I would like to prevent users from opening a new IE window by pressing CTRL+N or from File/New menu.
I tried to test window.opener or window.parent against null or "undefined" but it doesn't seem work.
Any ideeas ?
Thank you in advance.
|
|
|
|
|
Unless you're hosting IE as a control I don't think you can prevent this.
Todd Smith
|
|
|
|
|
At work I have an NT 4 Server/IIS 4 setup with an Access database and some ASP pages that works withour problem. The same pages and the same database are giving me problems at home under 2K Server/IIS 5.
My ASP page looks something like this:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
if not Request("id") = "" then
Dim conn, filePath
filePath = Server.MapPath("database.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
' Debug output code
Response.Write(Request("id") & "<br>")
for i = 0 to conn.properties.count - 1
Response.Write(conn.Properties(i).Name & ": " & conn.Properties(i) & "<br>")
Next
' end of Debug code
conn.Execute "DELETE FROM MyTable WHERE ID = " & Request("id")
conn.Close()
Set conn = Nothing
end if
Response.Redirect("complete.asp")
%>
The result of running this page is as follows:
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------------------------------------------------------------
Please try the following:
Click the Refresh button, or try again later.
Open the maggie home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type:
Microsoft JET Database Engine (0x80004005)
Could not delete from specified tables.
/mass/resourcing/delete.asp, line 18
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)
Page:
GET /mass/resourcing/delete.asp
Time:
27 August 2002, 19:29:46
More information:
Microsoft Support
I think it's something to do with write access to the database as I can read from it okay with a different page and AddNew causes similar problems. Any ideas on where to look to sort this out?
The debug output (when the Execute statement is commented out) looks like this:
148
Current Catalog:
Active Sessions: 128
Asynchable Commit: False
Catalog Location: 1
Catalog Term: Database
Column Definition: 1
NULL Concatenation Behavior: 2
Data Source Name: D:\Inetpub\wwwroot\mass\resourcing\masscouk.mdb
Read-Only Data Source: False
DBMS Name: MS Jet
DBMS Version: 04.00.0000
GROUP BY Support: 4
Heterogeneous Table Support: 2
Identifier Case Sensitivity: 8
Maximum Index Size: 255
Maximum Row Size: 4049
Maximum Row Size Includes BLOB: False
Maximum Tables in SELECT: 0
Multiple Storage Objects: False
Multi-Table Update: True
NULL Collation Order: 4
OLE Object Support: 1
ORDER BY Columns in Select List: False
Prepare Abort Behavior: 1
Prepare Commit Behavior: 2
Procedure Term: STORED QUERY
Provider Name: MSJETOLEDB40.DLL
OLE DB Version: 02.10
Provider Version: 04.00.4331
Schema Term: Schema
Schema Usage: 0
SQL Support: 512
Structured Storage: 9
Subquery Support: 63
Isolation Levels: 4096
Isolation Retention: 9
Table Term: Table
User Name: Admin
Pass By Ref Accessors: False
Transaction DDL: 16
Asynchable Abort: False
Data Source Object Threading Model: 1
Output Parameter Availability: 1
Persistent ID Type: 4
Multiple Parameter Sets: True
Rowset Conversions on Command: True
Multiple Results: 0
Provider Friendly Name: Microsoft OLE DB Provider for Jet
Alter Column Support: 36
Open Rowset Support: 2
Cache Authentication: True
Encrypt Password: False
Mask Password: False
Password:
User ID: Admin
Data Source: D:\Inetpub\wwwroot\mass\resourcing\masscouk.mdb
Window Handle: 0
Mode: 13
Prompt: 4
Extended Properties:
Locale Identifier: 1033
Jet OLEDB:System database:
Jet OLEDB:Registry Path:
Jet OLEDB:Database Password:
Jet OLEDB:Engine Type: 5
Jet OLEDB:Database Locking Mode: 0
Jet OLEDB:Global Partial Bulk Ops: 2
Jet OLEDB:Global Bulk Transactions: 1
Jet OLEDB:New Database Password:
Jet OLEDB:Create System Database: False
Jet OLEDB:Encrypt Database: False
Jet OLEDB:Don't Copy Locale on Compact: False
Jet OLEDB:Compact Without Replica Repair: False
Jet OLEDB:SFP: False
Jet OLEDB:Compact Reclaimed Space Amount: 24576
Autocommit Isolation Levels: 4096
Jet OLEDB:ODBC Command Time Out: 0
Jet OLEDB:Max Locks Per File: 0
Jet OLEDB:Implicit Commit Sync: False
Jet OLEDB:Flush Transaction Timeout: 0
Jet OLEDB:Lock Delay: 0
Jet OLEDB:Max Buffer Size: 0
Jet OLEDB:User Commit Sync: True
Jet OLEDB:Lock Retry: 0
Jet OLEDB:Exclusive Async Delay: 0
Jet OLEDB:Shared Async Delay: 0
Jet OLEDB:Page Timeout: 0
Jet OLEDB:Recycle Long-Valued Pages: False
Jet OLEDB:Reset ISAM Stats: True
Jet OLEDB:Connection Control: 2
Jet OLEDB:ODBC Parsing: False
Jet OLEDB:Page Locks to Table Lock: 0
Jet OLEDB:Sandbox Mode: False
Jet OLEDB:Transaction Commit Mode: 0
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
Looks to me like you need to give full security access to the database for the IUSR_* ID.
Paul
|
|
|
|