I have a template that calls a javascript function that in turn uses cfajax to
call a cfm function as below, it all works perfectly:
<!--- ==================== --->
<select size="1" id="jobData" name="jobData" class="form1"
onChange="getStartDates();">
<option value="#jb.jobID#">#jb.oilcompany#</option>
</select>
<!--- ==================== --->
function getStartDates()
{
var jobData = DWRUtil.getValue("jobData");
if (jobData != "n"){
DWREngine._execute(_cfscriptLocation, null,
'getRainOutDates', jobData, getRainResult);
DWRUtil.removeAllOptions("rainoutEnd");
}
else{
DWRUtil.removeAllOptions("rainoutStart");
DWRUtil.removeAllOptions("rainoutEnd");
}
}
<!--- ==================== --->
However I also need to call the same function elsewhere (as below) and I'm
struggling to do this:
<cfoutput>
<InvalidTag type="text/javascript">
document.getElementById('jobData') = #jb.jobID#;
getRainOuts();
</script>
I'm not getting any error messages and I'm sure there is a simple javascript
problem with the way I'm trying to call getRainOuts() any suggestions?
thanks, Andrew.
</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217022
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54