jQueryConfig::IncludejQuery

Routine that loads the jQuery library onto a page. Web Connection internally uses this routine to embed jquery into the page so if you always use this method jQuery will only be embedded once even if called more than once.

Generates the following output when using CDN:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js" type="text/javascript" ></script>
<script type="text/javascript">
if (typeof(jQuery) == 'undefined')
   document.write(unescape("%3Cscript src='/wconnect/scripts/jquery.js' type='text/javascript'%3E%3C/script%3E"));
</script>

When in Debug mode loads jquery.js
When not in Debug mode load jquery.min.js

o.IncludejQuery(lcScriptLocation,llAsString)

Parameters

lcScriptLocation
Default, CDN or an explicit absolute URL or ~/ relative URL

If this value is not passed "Default" is used which uses the values from jQueryCDNUrl and jQueryFallbackUrl.

llAsString
If .T. doesn't embed into the page, but returns the script tags as a string for manual embedding. Can be used with classic Web Connection applications:

<%= IncludejQuery() %>


See also:

Class jQueryConfig

© West Wind Technologies, 1996-2024 • Updated: 12/24/11
Comment or report problem with topic