Class Index | File Index

Classes


Namespace smileWidget-config

(JavaScript object literal) configuration options for smileWidget
Defined in: <js\smileWidget.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
<inner>  
Field Summary
Field Attributes Field Name and Description
<static>  
smileWidget-config.deferSearch
When false, widget will initiate a search immediately when smileWidget.initWidget is called.
<static>  
smileWidget-config.headerUrl
If headerUrl isn't null, the specified URL will be used in place of the default howtosmile logo header image.
<static>  
smileWidget-config.noResultsCallback
callback function to call if empty result set is received from server
<static>  
smileWidget-config.noResultsHTML
html content to be used when no results are returned by a search
<static>  
smileWidget-config.queryTimeout
how long to wait for response from server, in milliseconds (0 means wait forever) NOTE that the widget will not cancel it's attempt to load data even with a timeout specified, so results may still load.
<static>  
smileWidget-config.queryTimeoutCallback
callback function to call if timeout is reached with no response from server NOTE that the widget will not cancel it's attempt to load data even with a timeout specified, so results may still load.
<static>  
smileWidget-config.showPersistentSearch
When true, widget will display a persistent search-term entry form to add any given search term to the pre-configured search parameters.
<static>  
smileWidget-config.startHidden
When true, the widget will start out hidden, and show itself only when it has retrieved a non-empty result set.
Namespace Detail
<inner> smileWidget-config
// this example demonstrates setting a timeout value and two
// ways of setting callback functions
var timeout = 500;
function noresults() {
	alert('Sorry that search returned no results.');
}
var conf = {
	queryTimeout:timeout,
	queryTimeoutCallback:function(){
		alert( 'No data received from server after '+timeout+' millisec' );
	},
	noResultsCallback:noresults,
}
smileWidget.initWidget(null, {institution:{'The Exploratorium'}, conf );
Field Detail
<static> {Boolean} smileWidget-config.deferSearch
When false, widget will initiate a search immediately when smileWidget.initWidget is called. When true widget will not perform a search when smileWidget.initWidget is called (then use smileWidget.search to perform a search).
Default Value:
false

<static> {String} smileWidget-config.headerUrl
If headerUrl isn't null, the specified URL will be used in place of the default howtosmile logo header image. The default header logo is 200x66px. You may need to use customized CSS for acceptable results with a different size image.
Since:
1.3

<static> {Function} smileWidget-config.noResultsCallback
callback function to call if empty result set is received from server
Default Value:
null

<static> {String} smileWidget-config.noResultsHTML
html content to be used when no results are returned by a search
Default Value:
'Your search returned no results.'

<static> {Int} smileWidget-config.queryTimeout
how long to wait for response from server, in milliseconds (0 means wait forever) NOTE that the widget will not cancel it's attempt to load data even with a timeout specified, so results may still load.
Default Value:
0

<static> {Function} smileWidget-config.queryTimeoutCallback
callback function to call if timeout is reached with no response from server NOTE that the widget will not cancel it's attempt to load data even with a timeout specified, so results may still load.
Default Value:
null

<static> {Boolean} smileWidget-config.showPersistentSearch
When true, widget will display a persistent search-term entry form to add any given search term to the pre-configured search parameters. (If the widget is intialized with a "term" search parameter, it's value will be pre-filled in the form field)
Since:
1.2
Default Value:
false

<static> {Boolean} smileWidget-config.startHidden
When true, the widget will start out hidden, and show itself only when it has retrieved a non-empty result set.
Since:
1.3
Default Value:
false

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Jul 14 2010 15:30:12 GMT-0700 (PDT)