Simplicty and flexibility!


Function::

jsAction
jsAction(TOOLBAR) -- Toggle Toolbar
jsAction(NEW_FORM) -- Open New Form dialog
jsAction(ACTIVEDOCSTATE) -- Return value is the status of active document ex. DT or Catalog.
PS! This is 8.6 onward only


To be able to trigger a DataEase file menu action without clicking in the file menu. Function can be used anywhere in DataEase where you have active HTML like. WebCatalog, WebField, ServiceWindows.

You will need to include the definition of function in your HTML if it is not pre-defined.

<script>
function jsAction(actionNr) {

var vactionNr = actionNr.toString();

try {

if (window.external.hasPrismConnection) {

var fromprism = window.external.doAction(actionNr.toString());

msg = "We have contact with: " + fromprism;

} else

msg = "There is no contact and no catch";

} catch (err) {

msg = "There is no contact and a catch";

}

return fromprism;

}

</script>

Action Name is javascript variable. you need to define them  as below to use them directly or you can just use the ID value directly.

Parameters


Action Name:ID ValueDescription

ABOUTDATAEASE 21264 Show About Dialog 
ACTION 21230 
ACTIVEDOCSTATE30005 Show the State of the current document. RT - Runtime /DT -Design Time/Mode /NA - /Catalog , QBM/OML etc.
ADDFILTER_AND 21812 
ADDFILTER_OR 21813 
ALLBAR 30008 Show/Hide all Old Style Tool/Tab/Menu and Status bars. 
ALL_RECORDS 21364 
ALPHABETIC 21431 
APPLY 21320 
APPSTAT_ACTINFO 21649 
APPSTAT_BRLINFO 21656 
APPSTAT_DELETEINFO 21659 
APPSTAT_DOCINFO 21391 
APPSTAT_DQLINFO 21653 
APPSTAT_IMPORTINFO 21392 
APPSTAT_OBJINFO 21655 
APPSTAT_OMLINFO 21654 
APPSTAT_RECINFO 21389 
APPSTAT_REFRESHINFO 21658 
APPSTAT_RNGINFO 21657 
APPSTAT_SERVINFO 21390 
APPSTAT_TABLEINFO 21652 
ARRANGE 21272 
ASCENDING 21164 
BACKUP 21386 
BANDFOOTER 21831 
BANDHEADER 21830 
BOTH 21212 
BOTTOMEDGES 21208 
BROWSER 21010 
BUTTON_OBJ 21179 
CASCADE 21271 
CATALOG 21274 
CHANGE_KEY 21291 
CHECK_FLD_OBJ 21400 
CLASSES 21010 
CLEAR 21132 
CLEARDATAFILTER 21820 
CLEARFIELD 21133 
CLEARFILTERS 21155 
CLEARORDER 21157 
CLEAR_TABS 21316 
CLOSE 21108 
CLOSEALL 21273 
CLOSEAPP 21241 
COLOR 21229 
COLUMNS 21428 
COMMANDS 21422 
COMPILE 21660 
COPY 21130 
COPY_RECORD 21330 
COPY_SPECIAL 21331 
CUSTMENU 21313 
CUSTOM_FUNCTIONS 21243 
CUSTOM_OBJ 21185 
CUSTTOOLBAR 21406 
CUT 21129 
DATA20000_LINKS 21244 
DATAENTRY 21394 
DATAFILTER 21142 
DATAMODEL 21166 
DEFINE 21410 
DELETE 21109 
DELETEAPP 21256 
DELETERECORD 21158 
DELETE_DEF_RECORD 21664 
DESCENDING 21165 
DESELECT_OBJ 7000 
DOCUMENT 21285 
DOCUMENTS 21426 
DONE 21370 
ELLIPSE_OBJ 21183 
EVENTS 21729 
EXECUTE 21810 
EXIT 21117 
EXPORT 21112 
EXPRESSION 21811 
FIELD_OBJ 21177 
FILTERING 21152 
FIND 21640 
FIND_NEXT 21641 
FIND_PREV 21642 
FIRSTRECORD 21150 
FIRSTRECORD_P 21814 
FONT 21228 
FOOTER 21287 
FORMUSAGE 21310 
FORMVIEW 21140 
FUNCTIONS 21424 
GETBARSTATUS 30009 Give you the status on a Toolbar/Statusbar etc. returns VISIBLE or HIDDEN (Neither for ALLBAR if not all are hidden/visible.)
GRAPH_OBJ 21397 
GRIDOPTIONS 21227 
GRIDS 21225 
GRIDSNAP 21226 
HEADER 21286 
HELP_DESKTOP 21259 
HELP_DQL 21408 
HELP_GLOSSARY 21263 
HELP_HOWTO 21262 
HELP_INDEX 21258 
HELP_MENUS 21260 
HELP_ONLINE 21265 
HELP_SEARCH 21407 
HELP_TOOLBAR 21261 
HISTORY_NEXT 30002 
HISTORY_PREV 30003 
HORIZCENTER 21206 
HORIZONTAL 21210 
IMAGE_FLD_OBJ 21399 
IMPORT 21111 
INSTALL 21434 
INSTALL_APP 21254 
INST_OPTIONS 21436 
KEYPAD 21430 
LABELING 21395 
LASTRECORD 21151 
LASTRECORD_P 21817 
LAYOUT 21139 
LEFTEDGES 21205 
LINE_OBJ 21181 
LINKS 21135 
LISTVIEW 21141 
LIST_FLD_OBJ 21401 
LOCKAPP 21251 
LOOKUP 21160 
MENUBAR 21293 
METHODS 21017 
NAME 21232 
NEWAPP 21239 
NEWRECORD 21146 
NEW_DBRFILE 21651 
NEW_FORM 21101 
NEW_MENU 21103 
NEW_REPORT 21102 
NEW_SCRIPT 21650 
NEXTRECORD 21148 
NEXTRECORD_P 21816 
NEXT_PG 21278 
NEXT_PG_P 21819 
NOFILTERING 21153 
NO_ACTION 21000 
NO_RECORDS 21366 
NULL 0 
OBJECTPALETTE 21832 
OBJECTS 21010 
OLE_OBJ 21398 
OPEN 21104 
OPENAPP 21240 
OPEN_FORM 21827 
OPEN_MENU 21826 
OPEN_PROCEDURE 21829 
OPEN_REPORT 21828 
OPEN_TEXTFILE 21610 
OPERATORS 21425 
OUTLINES 21223 
PASTE 21131 
PASTELINK 21134 
PASTE_SPECIAL 21136 
PERFORMANCE 21405 
PICKLISTS 21421 
PICTURE_OBJ 21180 
POPUP 21002 
POPUP_APPLICATION 21238 
POPUP_APP_STATUS 21388 
POPUP_APP_UTILITIES 21385 
POPUP_DOCUMENT 21404 
POPUP_EDIT 21126 
POPUP_EDIT_ALIGN 21203 
POPUP_EDIT_OBJECT 21412 
POPUP_EDIT_SIZE 21393 
POPUP_FILE 21100 
POPUP_FILE_FRAME 21237 
POPUP_FILE_NEW 21361 
POPUP_GOTO 21145 
POPUP_HELP 21257 
POPUP_MULTIUSER 21363 
POPUP_OBJECTS 21396 
POPUP_PICK_LISTS 21420 
POPUP_QUERY 21384 
POPUP_SCRIPT 21409 
POPUP_STYLE 21231 
POPUP_VIEW 21138 
POPUP_VIEW_ZOOM 21368 
POPUP_WINDOW 21268 
PREDEFINED_PRINTERS 21881 
PREFERENCES 21250 
PREVIEW 21362 
PREVIOUSRECORD 21149 
PREVIOUSRECORD_P 21815 
PREV_PG 21279 
PREV_PG_P 21818 
PRINT 21114 
PRINTERSETUP 21113 
PROCEDURE 21317 
PROCS 21017 
PROPS 21017 
PRTSPEC 21312 
P_DATAMODEL 21311 
RADIO_FLD_OBJ 21402 
RD_BROWSE 21737 
RD_CREATE 21736 
READ_RECORDS 21365 
RECTANGLE_OBJ 21182 
REDO 21128 
REFRESH 21162 
REFRESH_AUTO 21161 
REFRESH_FORM 21433 
REFRESH_TIME 21367 
RELATEDFORM 21159 
RELATIONDIAG 21245 
RELATIONSHIPS 21242 
RENAMEAPP 21255 
RENAME_OBJECT 21732 
REORG 21253 
REPLACE 21643 
RESTORE 21252 
RESTORERECORD 21169 
RETRIEVE_DEF_FIELD 21661 
RETRIEVE_DEF_RECORD 21662 
RETURNDATA 21167 
RETURNTOPARENT 21170 
RIGHTEDGES 21204 
RULERS 21224 
SAVE 21106 
SAVEAS 21107 
SAVEASNEWRECORD 21168 
SAVERECORD 21147 
SAVE_DEF_RECORD 21663 
SAVE_TEXTFILE 21612 
SCRIPT 21017 
SCRIPT_METHOD_NEXT 21720 
SCRIPT_METHOD_OPTIONS 21722 
SCRIPT_METHOD_PREVIOUS 21721 
SECURITY 21314 
SELECTALL 21137 
SEPARATOR 21001 
SETFILTERS 21154 
SETORDER 21156 
SET_TABS 21315 
SE_ADD_REFRESH 21734 
SE_DELETE_REFRESH 21735 
SPIN_FLD_OBJ 21403 
SQL 21321 
SQL_COMMANDS 21423 
START_FIELD_DEFN 21733 
STATUSBAR 21222 
STYLES_LISTBOX 21809 
STYLE_DELETE 21234 
STYLE_SAVEAS 21235 
SUBFORM_OBJ 21176 
SUMMARY_OBJ 21186 
S_NEW_SCRIPT 21432 
S_PREFERENCES 21435 
S_RELATIONSHIPS 21429 
TABBAR 21292 
TABLES 21427 
TABLE_GRID_DISPLAY 21665 
TEMPLATES 21017 
TEST_DESIGN 21277 
TEST_RUN 21276 
TEXT 21411 
TEXT_OBJ 21178 
TILEHORIZ 21270 
TILEVERT 21269 
TOOLBAR 21221 
TOPEDGES 21207 
UNDO 21127 
UNLOCKAPP 21387 
UPDATE 21233 
USERS 21248 
USER_HELP 21290 
VARIABLE_OBJ 21184 
VERTCENTER 21209 
VERTICAL 21211 
ZOOM_BY 21822 
ZOOM_CUSTOM 21383 
ZOOM_FILL 21382 
ZOOM_FILL_HEIGHT 21824 
ZOOM_FILL_WIDTH 21825 
ZOOM_IN 21380 
ZOOM_NORMAL 21369 
ZOOM_OUT 21381 
ZOOM_PREVIOUS 21823 
ZOOM_TO21821

Returns/Result


Examples


Reference

See Also


On the forum about jsAction

On the blog about jsAction


dg3_HelpView