Created
March 8, 2012 21:34
-
-
Save 65/2003613 to your computer and use it in GitHub Desktop.
ajaxCFC Multiple Suggest on one page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- add in ajaxCFC bits---> | |
<script type='text/javascript'> | |
_ajaxConfig = {'_cfscriptLocation':'/packages/ajax/personalDetails.cfc', '_jsscriptFolder':'/scripts/ajaxcfc','debug':false}; | |
</script> | |
<script type='text/javascript' src='/scripts/ajaxcfc/ajax.js'></script> | |
<script type='text/javascript' src='/scripts/ajaxcfc/suggest.js'></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="fldPositionLookup" name="fldPositionLookup" value="#qContact.Position#" style="width:300px" maxlength="120" class="textfield" autocomplete="off" onFocus="onSuggestFieldFocus(positionLookup)"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// initialize a new suggest component | |
var departmentLookup = new Suggest(); | |
departmentLookup.setListWidth("298px"); | |
// initialize a second suggest component | |
var positionLookup = new Suggest(); | |
positionLookup.setListWidth("298px"); | |
function onInit() { | |
onSuggestFieldFocus(positionLookup); | |
positionLookup.InitQueryCode('positionLookup','fldPositionLookup','suggestPosition','freq','position') | |
departmentLookup.InitQueryCode('departmentLookup','fldDepartmentLookup','suggestDepartment','freq','department') | |
} | |
window.onload=onInit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment