Hey All,
I'm new to OpenBD....just kicking the tires so far....but I like what
I see (except docs....I have to say they really suck...sorry...not
trying to be harsh).
INDEX.CFM:
----------------------------------------------
<cfajaxproxy cfc="test" jsclassname="testProxy">
<script type="text/javascript">
testProxy = new testProxy();
getRecords = function() {
testProxy.setCallbackHandler(getRecords_Handler);
testProxy.getRecs();
}
getRecords_Handler = function(retVal) {
document.getElementById('showRecs').innerHTML=retVal;
}
</script>
<a href="" onClick="getRecords(); return false;">Get Records</a>
<br/><br/>
<div id="showRecs">
</div>
----------------------------------------------
TEST.CFC
----------------------------------------------
<cfcomponent displayname="test">
<cffunction name="getRecs" hint="gets some records from a CF built
query" access="remote" returntype="string" output="no">
<cfset var myQuery = queryNew("ID,FNAME,LNAME")>
<cfset var myHTML = "">
<cfset temp = queryAddRow(myQuery)>
<cfset temp = querySetCell(myQuery,"ID","1")>
<cfset temp = querySetCell(myQuery,"FNAME","Goof")>
<cfset temp = querySetCell(myQuery,"LNAME","Ball")>
<cfset temp = queryAddRow(myQuery)>
<cfset temp = querySetCell(myQuery,"ID","2")>
<cfset temp = querySetCell(myQuery,"FNAME","Super")>
<cfset temp = querySetCell(myQuery,"LNAME","Duper")>
<cfsavecontent variable="myHTML">
<cfoutput>
<table>
<tr>
<td>ID</td>
<td>First Name</td>
<td>Last Name</td>
</tr>
<cfloop query="myQuery">
<tr>
<td>#ID#</td>
<td>#FNAME#</td>
<td>#LNAME#</td>
</tr>
</cfloop>
</table>
</cfoutput>
</cfsavecontent>
<cfreturn myHTML>
</cffunction>
</cfcomponent>
----------------------------------------------
In OpenBD (latest nightly build):
The page displays with the link "Get Records".....when clicked it does
nothing.
In CF 8
Properly gets the HTML string and displays it in the "showRecords" DIV
Am I doing anything wrong?? I can't tell as the Wiki is so
unclear.....shows CFAJAXYPROXY on the "unique" page (nothing behind it
when clicked).....doesn't show it on the "supported" page.....doesn't
show it on the "unsupported" page. To top it off, there clearly is a
CFAJAXPROXY tag or my page would not render at all (as was the case
when using the stable build).
So ya see my point on the docs and their suckingness ;-)
Anyways...great effort to those that have contributed to
OpenBD!!....and insight would be greatly appreciated ;-)
Cheers
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
http://groups.google.com/group/openbd?hl=en
official site @ http://www.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---