Click or drag to resize

JSHelper Methods

The JSHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddApplicationScriptRefs
Adds the standard application .js script reference(s).
Public methodStatic memberAddFrameworkScriptRef
Add a javascript file reference that depends on framework script (e.g. jQuery or Bootstrap).
Public methodStatic memberAddGoogleAnalytics
Add Google Analytics script to the page header. For best performance this should go at the very end of the header, immediately before the close of the header tag.
Public methodStatic memberAddLinkRef(Page, String, Boolean)
Add stylesheet references to the page header. Note that application developers who want to limit browser caching should generally use the AddLinkRef(Page, String, String) overload and provide the AppCacheVer(IAppContext) as the cacheVer.
Public methodStatic memberAddLinkRef(Page, String, String)
Add stylesheet references to the page header. Generally application developers who want to limit browser caching should provide the AppCacheVer(IAppContext) as the cacheVer.
Public methodStatic memberAddLinkRef(Page, String, String, String, Boolean)
Add a stylesheet reference (or other links) to the page header. Note that application developers who want to limit browser caching should generally use the AddLinkRef(Page, String, String, String, String) overload and provide the AppCacheVer(IAppContext) as the cacheVer.
Public methodStatic memberAddLinkRef(Page, String, String, String, String)
Add a stylesheet reference (or other links) to the page header. Generally application stylesheet references should be added using the AddLinkRef(Page, String, String) overload and this overload only for other types of links. Note that application developers who want to limit browser caching should generally provide the AppCacheVer(IAppContext) as the cacheVer.
Public methodStatic memberAddScriptRef(Page, String, Boolean)
Add script references to the page header.
Public methodStatic memberAddScriptRef(Page, String, String)
Add script references to the page header. Generally application developers who want to limit browser caching should provide the AppCacheVer(IAppContext) as the cacheVer.
Public methodStatic memberAddScriptRef(Page, String, Boolean, Int32)
Add script references to the page header.
Public methodStatic memberAddScriptRef(Page, String, String, Int32, Boolean, Boolean)
Add script references to the page header. Generally application developers who want to limit browser caching should provide the AppCacheVer(IAppContext) as the cacheVer.
Public methodStatic memberAlertInit
Returns the script to initialized client-side pinging for alerts. This is normally called only from top windows.
Public methodStatic memberAppCacheVer
Gets a version string to manage browser caching of css and js files.
Public methodStatic memberCrumbSet
Returns the script for calling the CrumbSet() breadcrumb management function.
Public methodStatic memberDelFilter
Returns the script for deleting a saved mapper filter.
Public methodStatic memberDirtyConfirm(String)
Generate javascript for use in an onclick handler to determine whether the current page is dirty and, if so, to confirm that the user wants to abandon their changes. Normally this script is prepended to any other javascript that may be performed. If the only action involved is a navigation via an anchor tag then typically this script is sufficient by itself.
Public methodStatic memberDirtyConfirm(String, String)
Generate javascript for use in an onclick handler to determine whether the current page is dirty and, if so, to confirm that the user wants to abandon their changes. Normally this script is prepended to any other javascript that may be performed. If the only action involved is a navigation via an anchor tag then typically this script is sufficient by itself. Typically you should use the DirtyConfirm(String) overload which uses window as the window symbol unless you know you need to refer to the window differently.
Public methodStatic memberEAPDefaultCSS
Gets the path to the EAPDefault CSS file with a query parameter to prevent unwanted browser caching. Use EAPDefaultCSS(IAppContext) instead in order to allow for the BaseCSS override.
Public methodStatic memberEAPDefaultCSS(IAppContext)
Gets the path to the EAPDefault CSS file with a query parameter to prevent unwanted browser caching. Call this method, instead of EAPDefaultCSS in order to allow for the BaseCSS override.
Public methodStatic memberEAPjQueryJS
Gets the path to the EAPjquery.js javascript file with a query parameter to prevent unwanted browser caching.
Public methodStatic memberEAPjQueryUIJS
Gets the path to the EAPjqueryUI.js javascript file with a query parameter to prevent unwanted browser caching.
Public methodStatic memberEAPMobileJS
Gets the path to the EAPMobile.js javascript file with a query parameter to prevent unwanted browser caching.
Public methodStatic memberEAPUtilJS
Gets the path to the EAPUtils javascript file with a query parameter to prevent unwanted browser caching.
Public methodStatic memberEnsureDoPostBack
Ensures that .Net registers a __doPostBack method on the page. Normally .Net only registers __doPostBack if the page contains at least one control that invokes a postback. Typically this is fine, however, when rendering custom HTML that wants to use __doPostBack you should call this method to ensure that .Net registers the method on the page.
Public methodStatic memberEval
Evaluate an arbitrary javascript expression.
Public methodStatic memberEvalBool
Evaluate a javascript expression and interpret the results as a boolean value.
Public methodStatic memberGenApplicationScriptRefs
Generate the HTML for the standard application .js script reference(s).
Public methodStatic memberGenLinkRef
Generate the HTML for a .css link reference.
Public methodStatic memberGenScriptRef
Generate the HTML for a .js script reference.
Public methodStatic memberGenScriptTag
Generate the HTML for a block of javascript code.
Public methodStatic memberHighChartsJS
Gets the resource URL for HighCharts functionality
Public methodStatic memberjQueryPath
Gets the path to the jQuery library javascript file appropriate for current application settings. Determination of what consistutes the correct version of jQuery involves a number of factors including:
  • Minimum version of IE to support (see MinIEVersion).
  • Bootstrap version (or legacy pre-Bootstrap UI).
  • Whether or not the jQueryPathCompatibilityFeature is set.
Public methodStatic memberOpenBootModal(String) Obsolete.
Generate javascript to open a modal dialog to present the specified URL. This method is deprecated in favor of OpenBootModal(IAppContext, String, BootModalOptions) in order to provide improved support on mobile devices.
Public methodStatic memberOpenBootModal(IAppContext, String, BootModalOptions)
Generate javascript to open a modal dialog to present the specified URL.
Public methodStatic memberOpenBootModal(IAppContext, String, BootModalOptions, String)
Generate javascript to open a modal dialog to present the specified URL. If a non-blank CSS class name is provided the class will be added to the dialog outer container and a CSS class will be added to the body contained in the dialog's IFRAME with a "-body" suffix (e.g. if the CSS class name is "my-dialog" then "my-dialog-body" will be added to the contained body). A class is applied to the contained body because it is contained in an IFRAME and you cannot apply CSS across IFRAME elements.
Public methodStatic memberOpenIWin
Generate javascript for in inplace iframe div widget.
Public methodStatic memberOpenLightbox
Generate javascript to open a lightbox window (currently using jQuery Colorbox by Jack Moore) to present the specified URL.
Public methodStatic memberOpenPopupWindowJS(String, NavTarget)
Returns the script to open a popup window.
Public methodStatic memberOpenPopupWindowJS(String, String, String, PopupOpts, String)
Returns the script to open a popup window.
Public methodStatic memberPopcalDateStrings
Generate the localization strings for the popcal.js widget.
Public methodStatic memberPopSafeClose
If the current window is a popup window or an iframe hosted in a Bootstrap modal dialog, then the window/dialog will be closed. If not, the provide non-popup javascript will be executed.
Public methodStatic memberPopupCal
Returns the script to pop up the calendar widget.
Public methodStatic memberPopupTimePicker
Returns the script to pop up the time picker widget.
Public methodStatic memberRegisterAsbMenu
Register the DIV required by the ASB (Auto-Suggest Box) functionality.
Public methodStatic memberRegisterMonthsArray
Resister an array of localized full and abbreviated month names for the specified culture. This array is used by platform javascript code for parsing and rendering formatted dates.
Public methodStatic memberRegisterSupersubs
Register startup script for the supersubs (an improved superfish) cascading menu jQuery plug-in. May be called multiple times without causing multiple registrations.
Public methodStatic memberStatusMsgJS(String, StatusMsgOptions)
Generates javascript for calling the javascript StatusMsg() function which provides a message and optional animated icon showing that processing is being performed. The StatusMsg() function is appropriate for use on a post. At this time it is not appropriate for use with AJAX calls because there is currently no mechanism for clearing the status indicator. The indicator goes away when the new page replaces the old.
Public methodStatic memberStatusMsgJS(String, StatusMsgOptions, Int32)
Generates javascript for calling the javascript StatusMsg() function which provides a message and optional animated icon showing that processing is being performed. The StatusMsg() function is appropriate for use on a post. At this time it is not appropriate for use with AJAX calls because there is currently no mechanism for clearing the status indicator. The indicator goes away when the new page replaces the old.
Public methodStatic memberStatusMsgJS(IAppContext, String, String, StatusMsgOptions)
Generates javascript for calling the javascript StatusMsg() function which provides a message and optional animated icon showing that processing is being performed. The StatusMsg() function is appropriate for use on a post. At this time it is not appropriate for use with AJAX calls because there is currently no mechanism for clearing the status indicator. The indicator goes away when the new page replaces the old.
Public methodStatic memberStatusMsgJS(IAppContext, String, String, StatusMsgOptions, Int32)
Generates javascript for calling the javascript StatusMsg() function which provides a message and optional animated icon showing that processing is being performed. The StatusMsg() function is appropriate for use on a post. At this time it is not appropriate for use with AJAX calls because there is currently no mechanism for clearing the status indicator. The indicator goes away when the new page replaces the old.
Public methodStatic memberToDateScript
Create a javascription expression for a date object.
Public methodStatic memberValidWindowOpenTarget
Convert a window.open() target string into one valid for all browsers. IE is picky.
Top
See Also