Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
controlWindow.js
Package: MEIMS.rar [view]
Upload User: ah_jiwei
Upload Date: 2022-07-24
Package Size: 54044k
Code Size: 2k
Category:
ADO-ODBC
Development Platform:
Visual C++
- ////////////////////////////////////////////////////
- // controlWindow object
- ////////////////////////////////////////////////////
- function controlWindow( controlForm ) {
- // private properties
- this._form = controlForm;
- // public properties
- this.windowType = "controlWindow";
- // this.noSuggestionSelection = "- No suggestions -"; // by FredCK
- this.noSuggestionSelection = FCKLang.DlgSpellNoSuggestions ;
- // set up the properties for elements of the given control form
- this.suggestionList = this._form.sugg;
- this.evaluatedText = this._form.misword;
- this.replacementText = this._form.txtsugg;
- this.undoButton = this._form.btnUndo;
- // public methods
- this.addSuggestion = addSuggestion;
- this.clearSuggestions = clearSuggestions;
- this.selectDefaultSuggestion = selectDefaultSuggestion;
- this.resetForm = resetForm;
- this.setSuggestedText = setSuggestedText;
- this.enableUndo = enableUndo;
- this.disableUndo = disableUndo;
- }
- function resetForm() {
- if( this._form ) {
- this._form.reset();
- }
- }
- function setSuggestedText() {
- var slct = this.suggestionList;
- var txt = this.replacementText;
- var str = "";
- if( (slct.options[0].text) && slct.options[0].text != this.noSuggestionSelection ) {
- str = slct.options[slct.selectedIndex].text;
- }
- txt.value = str;
- }
- function selectDefaultSuggestion() {
- var slct = this.suggestionList;
- var txt = this.replacementText;
- if( slct.options.length == 0 ) {
- this.addSuggestion( this.noSuggestionSelection );
- } else {
- slct.options[0].selected = true;
- }
- this.setSuggestedText();
- }
- function addSuggestion( sugg_text ) {
- var slct = this.suggestionList;
- if( sugg_text ) {
- var i = slct.options.length;
- var newOption = new Option( sugg_text, 'sugg_text'+i );
- slct.options[i] = newOption;
- }
- }
- function clearSuggestions() {
- var slct = this.suggestionList;
- for( var j = slct.length - 1; j > -1; j-- ) {
- if( slct.options[j] ) {
- slct.options[j] = null;
- }
- }
- }
- function enableUndo() {
- if( this.undoButton ) {
- if( this.undoButton.disabled == true ) {
- this.undoButton.disabled = false;
- }
- }
- }
- function disableUndo() {
- if( this.undoButton ) {
- if( this.undoButton.disabled == false ) {
- this.undoButton.disabled = true;
- }
- }
- }