Cfajaxproxy and IE 7

I am currently developing a CMS.
I am having a problem sending html code to a CFC using
cfajaxproxy in IE7. The code works perfect in Firefox 3
and Safari. The error that I get in IE 7 is the following:
Error: The system cannot locate the resource specified.
The CF8 server is updated with updater 1. I think it is a CF
Bug.
Here is a test page broken down to a very simple form:
http://cms.lbcc.edu/testephox.cfm
Here is the code:
<cfajaxproxy cfc="cmsadmin.components.webpage"
jsclassname="getpageOBJ">
<html>
<head>
<script language="JavaScript" type="text/javascript">
var submitform = function(){
res = document.testform.ta.value;
var catID = 5;
var editorContent = new getpageOBJ();
editorContent.savepage(catID,res);
</script>
</head>
<body>
<form action="" method="post" name="testform">
<textarea name="ta" cols="80" rows="30">
<table width="100%" border="0" cellpadding="0"
cellspacing="0" bgcolor="#000000" class="tablestylefooter">
<tr>
<td width="100%" valign="top" colspan="3"><img
src="
http://www.lbcc.edu/images/web_temp_images/spacer_top.gif"
width="100%" height="10" alt="" /></td>
</tr>
<tr>
<td colspan="3" width="100%">
<table width="100%" border="0" cellspacing="0"
cellpadding="3">
<tr>
<td width="33%" align="left" class="footer"><span
class="footertext1"><b>test</b></span><br
/> <span class="footertext2"> 49asdfdsaf East Carson
Street<br /> </span>
</td>
<td valign="top" width="33%" height="46">
<div align="center">
<span class="footertext3"><br />
ads </span><br /><a href="
http://acit.lbcc.edu/webcorner/index.cfm"
title="Web Standards" class="linkcolor1">Web
Standards</a></div>
</td> <td align="right" class="footer" width="33%"
> <div align="right"><span
class="footertext1"><b>adsfdsfsaf</b></span><br
/>
<span class="footertext2"> adsf adsfy<br />
Ladsf, CA 90806</span></div></td>
</tr>
</table>
</textarea>
</form>
<a href="javascript:void(0);"
onClick="javascript:submitform();">Save Page</a>
</body>
</html>
Any suggestions would be appreciated.
Thanks.
Ron

Thanks to Raymond Camden I was able to get on the right path.
The cfajaxproxy was sending the editor information using
"GET". If you are sending information
through the cfajaxproxy you are limited using "GET". All I
had to do is add the following:
var editorContent = new getpageOBJ();
editorContent.setForm('testform');
editorContent.setHTTPMethod('POST');
editorContent.savepage(catID,res);
The setHTTPMethod('POST') worked perfectly!
Ron

Similar Messages

  • Rich forms unavailable after new JRun 4 server creation and deployment

    I am running CFENT 8 in the JRun multiserver version.
    Yesterday I took my production server, created a WAR and deployed
    it as a development environment. The server functions with cfquery
    and I can output the data in standard HTML tables. But, if I open
    the pages using cfchart, cfmenu, cfajaxproxy and many of the other
    RIA tags the output is supressed. In the case of cftooltip I get a
    javascript error that says, "YAHOO' is undefined.
    Did I post enough information? Has anyone seen this before? I
    think I might need to install FLex on the new instance but I'm
    looking for some guidance before I do it.

    SharedDynamics wrote:
    > I am running CFENT 8 in the JRun multiserver version.
    Yesterday I took my
    > production server, created a WAR and deployed it as a
    development environment.
    > The server functions with cfquery and I can output the
    data in standard HTML
    > tables. But, if I open the pages using cfchart, cfmenu,
    cfajaxproxy and many
    > of the other RIA tags the output is supressed. In the
    case of cftooltip I get
    > a javascript error that says, "YAHOO' is undefined.
    Make sure all of your CFIDE/scripts has been copied.
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

  • CFAJAXPROXY / JavaScript: get @@IDENTITY ?

    Hello, everyone.
    (This is back on, now.)
    Been giving this one a lot of thought, and just don't know enough about using CFAJAXPROXY to figure it out.
    Another  developer has created a CFC that has many, many functions in it.  I'm  using CFAJAXPROXY and JavaScript to access one or two of the functions.
    One  of the functions will add a row of data to a table with just a few of  the columns populated with data (the rest are 'allow null').
    What  I'm trying to do is get the page to refresh with that new record  populating some of the form fields.  The data that populates is chosen  by a CFSELECT tag with an onChange event.
    Can anyone think of a  way, via JavaScript, to get the @@IDENTITY of the data that was just  entered into the table?  If it were pure CF, I'd just put another query  immediately after the insert query, and surround both of them with a  CFTRANSACTION tag.  But I don't think JavaScript has an equivalent.
    Thanks,
    ^_^

    cfsilence wrote:
    cfajaxproxy is just a - proxy - that calls the server side component via Ajax so if you need to return the ID of the newly created record you can just return it from the component and the ajaxproxy should get the value.  You might also want to look at getting the generated key/id via cfquery's result attribute instead of using @@Identity.
    Unfortunately, I don't think modifying the method is an option; it's currently returning a string that is the query generated to insert the data into the table.
    Is there a way to access the generated key/id from the query that is being run by the method?
    Thanks,
    ^_^

  • CFAJAXPROXY / JavaScript: get @@IDENTITY of data just entered

    Hello, everyone.
    Been giving this one a lot of thought, and just don't know enough about using CFAJAXPROXY to figure it out.
    Another developer has created a CFC that has many, many functions in it.  I'm using CFAJAXPROXY and JavaScript to access one or two of the functions.
    One of the functions will add a row of data to a table with just a few of the columns populated with data (the rest are 'allow null').
    What I'm trying to do is get the page to refresh with that new record populating some of the form fields.  The data that populates is chosen by a CFSELECT tag with an onChange event.
    Can anyone think of a way, via JavaScript, to get the @@IDENTITY of the data that was just entered into the table?  If it were pure CF, I'd just put another query immediately after the insert query, and surround both of them with a CFTRANSACTION tag.  But I don't think JavaScript has an equivalent.
    Thanks,
    ^_^

    Nevermind.  I was just informed that I'm adding data to the database when I'm supposed to wait and add it, later.  Sorry.
    ^_^

  • Javascript inside cffunction

    I have a really stupid question, but I need to use some javascript in a cffunction in a cfc.
    Is this possible?
    I am trying to use google maps geocode to get the latitude and longitude for addresses and it works in a cfm page, but doesn't in the cffunction.
    the below converts the data to json and sends it to a cfc, the cfc then write the data to a file.
    the overall goal is to call the service and get this information back in cfml if all possible. we are using google maps api v3.
    here is my code:
    testget.cfm
    <cfajaxproxy cfc="cfc.mycfc" jsclassname="gs">
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
       var geocoder;
           geocoder = new google.maps.Geocoder();
           var address = 'your street, your city, your state, your zipcode';
        geocoder.geocode( {address: address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK && results.length) {
         // You should always check that a result was returned, as it is
         // possible to return an empty results object.
         if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
          var e = new gs();
          var jsonObj = ColdFusion.JSON.encode(results[0].geometry.location);
          var json = e.updateLatLng(jsonObj);
    </script>
    mycfc.cfc
    <cffunction name="updateLatLng" access="remote" >
    <cfargument name="latlng" >
    <cfset i = deserializeJSON(latlng) >
    <cfset lat = i.Yd />
    <cfset lng = i.$d />
    <cffile action = "write"
    file = "C:\ColdFusion8\wwwroot\dev.zipoodle.com\jsontest.txt"
    output = "cfclat = #lat# and cfclng = #lng#" >
    </cffunction>

    it actually work as a proof of concept of sending the data to the cfc and writing to a text file.
    <cffunction name="updateLatLng" access="remote">
    <cfargument name="latlng">
    <cfset i = deserializeJSON(latlng)>
    <cfset lat = i.Yd />
    <cfset lng = i.$d />
    <cffile action = "write"
    file = "C:\ColdFusion8\wwwroot\dev.zipoodle.com\jsontest.txt"
    output = "cfclat = #lat# and cfclng = #lng#">
    </cffunction>
    This would actually take my geocode results and create a cf variables of lat and lng.  I thought then I could use these to update the db.
    but I use flex a my application so using the cfm example would only work if I use this in my page and call it from flex. Which is an option, but the problem is getting the data back into flex from the cfc. If I used a cfajaxproxy and set the result handler to come back, then I need a platform to get the results from the cfc back to flex.
    Does the geolocation have to occure after the record is created?  Is it ok to do it before like you where doing in your first post?
    No I would prefer to get this information before creating the record, but I was afraid of the cftransaction waiting on the geocode data to come back...time out... Either way before or after doesn't matter to me, I would prefer before, becuase of a single entry, but I am open for suggestions.

  • The Problem With CF

    Hi,
    I love CF I really do, but when will Adobe optimize their JS
    scripts and CSS etc??
    I have CF8 and using the new cfwindow tag is more pain than
    it's worth because it includes so many JS files and badly inserted
    inline scripts or CSS. I would love to use it, but the page size
    can start to get a little crazy.
    Don't get me wrong, I love all this new stuff, but I would
    like Adobe to concentrate a bit more on optimization with many of
    CFs features - old and new, hopefully with a new release in the
    future.
    CF links to JS files that can be quite large, but since many
    of these wont even be touched by its users, why not link to heavily
    compressed versions instead - reducing white space etc and saving
    bandwidth.
    It's not a big deal for some, but on a site with hundreds of
    thousands of impressions a day this can be a big problem.
    What are your thoughts??
    Thanks,
    Mikey.

    Check out the CFAJAXIMPORT tag. The AJAX support in CF8 is
    provided ala cart, so you can use as much or as little as you like,
    mix and match your favorite frameworks, balance development speed
    and functionality, etc.
    1) First we have the CFAJAXPROXY and "Ajax Plumbing" -level
    features which offer no UI components and simply make Ajax
    development easier with JavaScript proxies for the remote methods
    on a server side CFC, Ajax client side debugging, Adobe Spry,
    support for Spry dataset binding, JSON, data marshalling, client
    side data binding, etc.
    2) Then we have the "full Monty" with the UI controls, etc,
    powered by the Yahoo! UI Ajax toolkit and Jack Slocum's excellent
    ExtJS Yahoo UI Toolkit add-in components, and our own Spry toolkit
    plumbing, etc.
    If you don't like #2 for any reason, you can always do Ajax
    development using your favorite Ajax UI framework (jQuery, Dojo,
    etc), but still use all the great "Ajax plumbing" productivity
    features we've added to make developing in your favorite Ajax UI
    framework super fast and easy. No prob.
    We knew we couldn't make everybody happy with one fixed
    feature set, so we broke it down into "use what you like, leave
    what you don't" levels of Ajax integration.
    Having said that, we did pay particular attention to the
    download sizes for both levels of Ajax feature integration, and I
    think you'll find that you can build a very svelte Ajax app (~51k
    total download size, including data...about the size of a
    medium-weight JPEG these days) using the Ajax plumbing feature set.
    The CFAJAXIMPORT tag can help you fine tune what you want
    downloaded as well.
    Hope that helps clarify what we tried to do in CF8.
    Damon

  • Problem with cfajaxproxy

    I'm having trouble with cfajaxproxy. I've copied demos and
    they work as far as displaying the correct cfc invocation response
    in the ajax debugger.
    But - I can't seem to get setCallbackHandler to work. The
    data never comes back. My callbackhandler never gets called.
    Please help.
    Shel

    please help us help you: post your code!
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • CFAJAXPROXY problem, need help !

    I created subdomains on my server for development part of my website and the cfajaxproxy is working great on the live version and on my subdomain dev.mydomain.com. I created a new subdomain name dev2.mydomain.com and now the cfajaxproxy isn't working on that one. I've check my admin panel and all but I'm enable to find anything that can change the configuration specificaly for cfajaxproxy.
    Anyone have a clue about that ?
    Thanks all lot !

    I suspect that CF is generating HTML script tags with src values that point to a directory that is not on your dev2 site.  CF generally expects to find its JavaScript files and other resources in the /CFIDE directory subtree.  I suspect you will need to map the physical directory where the CFAJAX component are, probably in /CFIDE on your root web site, to a virtual directory on your dev2 domain site.

  • Cfajaxproxy problem in CF9

    We just upgraded to ColdFusion 9 on a Windows Server 2003 box that uses IIS 6 to serve the sites.
    Now that we've upgraded all of our <cfajaxproxy> tags are broken.  Here is a sample:  <cfajaxproxy cfc="getReports" jsclassname="GetReportsInfo">.  The cfcs reside in the same directory as the cfm pages but we are getting an error that says "The specified CFC getReports could not be found. 
    The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings."
    It doesn't make sense that if they are in the same directory as the calling program then why can't it find them.

    Yes we're running the site from an IIS virtual directory.  I tried the
    real directory path with both \ and . notation but I'm still getting the
    same error.  We upgraded from CF 8.0.1 and it was the same IIS
    configuration with virtual directories.  The note that you point out from
    the developer's guide says that "The componentPath value must be ... the
    directory that contains the current page" which is the case with the code
    that I originally posted because the cfc and calling cfm page reside in
    the same directory.

  • Cfajaxproxy problem

    Hi everyone,
      i have a little problem using the cfajaxproxy tag or any other tag using ajax.
      here is a the code
      <cfajaxproxy cfc="mdh.dev.test.proxy" jsclassname="proxy" />
      function testFunction() {
            var instance = new proxy();
            instance.setCallbackHandler(functionSuccess);
            instance.testing();
        the result in the source will be:
    <script type="text/javascript">
        var _cf_proxy=ColdFusion.AjaxProxy.init('/dev/test/test/proxy.cfc','mdh.dev.test.proxy');
        _cf_proxy.prototype.testing=function() { return ColdFusion.AjaxProxy.invoke(this, "testing", {});};
    </script>
    the " mdh " is a logical mapping in coldfusion admin and in IIS
    i can't find why the url is trunked in the source result.
    instead of being
    var _cf_proxy=ColdFusion.AjaxProxy.init('/mdh/dev/test/test/proxy.cfc','mdh.dev.test.proxy');
    it create
    var _cf_proxy=ColdFusion.AjaxProxy.init('/dev/test/test/proxy.cfc','mdh.dev.test.proxy');
    anyone else having this problem ?
    tyvm

    I have a related question:
    <cfset testObject=createobject("component","mdh.dev.test.proxy")>
    what values for createobject() would I use if my testing server is
      http://192.168.1.128:8500/mdh/dev/proxy.cfc
    and my file, under windows, is located at: C:\ColdFusion8\wwwroot\mdh\dev\test\proxy.cfc ?
    what values for createobject() would I use if my testing server is
      http://192.168.1.128:8500/mdh/dev/proxy.cfc
    and my file, under windows, is located in a different folder: C:\ColdFusion8\wwwroot\mdh\CFCs\proxy.cfc ?
    Thanks

  • Bind in form works with cfinput, how to with cfselect and a href

    Hi all
    This code workks binding a cfinput in an HTML cfform:
    Name:<cfinput type="text" name="FIRSTNAME" label="Name" required="yes" width="150" bind="{UsersGrid.FIRSTNAME}" >
    However this href doesn't seem to bind correctly:
    <a  href="http://www.google.com/search?hl=en&output=search&sclient=psy-ab&q={UsersGrid.COMPANY}&btnK=" bind="{UsersGrid.COMPANY}">Google.com</a>
    This cfselect doesn't either:
    Department: <cfselect name="DEPARTMENT1" width="100" size="1" label="Department" required="yes" bind="UsersGrid.DEPARTMENT1">
    <option></option><cfoutput query="dNames"><option value="#DEPARTMENTIDS#">#DEPARTMENTNOM#</option></cfoutput>
    </cfselect> 
    How can I make them both work? Thank you

    Sure, Aaaron here it is, it uses the same database tables and datasource as in the other thread:
    <cfquery name="QNAMES" datasource="tester">
        select * from company, industries, division
    where company.SECTORS1 = industries.SECTORSIDS
    <cfif structKeyExists(url,"sectorid")>
    and industries.SECTORSIDS = #url.sectorid#</cfif>
    and division.DEPARTMENTIDS = company.DEPARTMENT1
    and company.WHEN = 2
    ORDER BY company</cfquery>
    <cfquery name="dNames" datasource="tester">
        select DEPARTMENTIDS, DEPARTMENTNOM
        from division
    order by DEPARTMENTNOM</cfquery>
    <CFQUERY name="industries" datasource="tester">
    SELECT * FROM industries
    </CFQUERY>
    <CFQUERY name="salesstep" datasource="tester">
    SELECT * FROM sales
    </CFQUERY>
    <CFQUERY name="xity" datasource="tester">
    SELECT * FROM ciudad
    </CFQUERY>
    <CFQUERY name="hols" datasource="tester">
    SELECT * FROM holidays
    </CFQUERY>
    <!--- UPDATE QUERY --->
    <cfif isDefined("FORM.UPDATEADDBTN")>
    <cfif FORM.ENTID GTE 1>
    <cfset isCOMPANYNull = iif(len(trim(FORM.COMPANY)) EQ 0, true, false)>
    <cfset isSECTORS1Null = iif(len(trim(FORM.SECTORS1)) EQ 0, true, false)>
    <cfset isRANKINGNull = iif(len(trim(FORM.RANKING)) EQ 0, true, false)>
    <cfset isPRICENull = iif(len(trim(FORM.PRICE)) EQ 0, true, false)>
    <cfset isDEPARTMENT1Null = iif(len(trim(FORM.DEPARTMENT1)) EQ 0, true, false)>
    <cfset isFIRSTNAMENull = iif(len(trim(FORM.FIRSTNAME)) EQ 0, true, false)>
    <cfset isPOSNull = iif(len(trim(FORM.POS)) EQ 0, true, false)>
    <cfset isPHONENull = iif(len(trim(FORM.PHONE)) EQ 0, true, false)>
    <cfset isEMAILNull = iif(len(trim(FORM.EMAIL)) EQ 0, true, false)>
    <cfset isMOBILENull = iif(len(trim(FORM.MOBILE)) EQ 0, true, false)>
    <cfset isADDRESSNull = iif(len(trim(FORM.ADDRESS)) EQ 0, true, false)>
    <cfset isCITYNull = iif(len(trim(FORM.CITY)) EQ 0, true, false)>
    <cfset isCOMMENTSNull = iif(len(trim(FORM.COMMENTS)) EQ 0, true, false)>
    <cfset MEETINGDATE = trim(FORM.ABUNDANCE)>
    <!--- DATECFM--->
    <cfset isMTGTNull = iif(len(trim(FORM.MTGT)) EQ 0, true, false)>
    <cfset isSTATE1Null = iif(len(trim(FORM.STATE1)) EQ 0, true, false)>
    <CFQUERY name="updatecompany" datasource="tester">
    update COMPANY
    SET COMPANY = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMPANY)#" null="#isCOMPANYNull#" />,
       SECTORS1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.SECTORS1)#" null="#isSECTORS1Null#" />,
       RANKING = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.RANKING)#" null="#isRANKINGNull#" />,
       PRICE = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.PRICE)#" null="#isPRICENull#" />,
       DEPARTMENT1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.DEPARTMENT1)#" null="#isDEPARTMENT1Null#" />,
       FIRSTNAME = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.FIRSTNAME)#" null="#isFIRSTNAMENull#" />,
       POS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.POS)#" null="#isPOSNull#" />,
       PHONE = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.PHONE)#" null="#isPHONENull#" />,
       EMAIL = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.EMAIL)#" null="#isEMAILNull#" />,
       MOBILE= <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MOBILE)#" null="#isMOBILENull#" />,
       ADDRESS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.ADDRESS)#" null="#isADDRESSNull#" />,
       CITY = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.CITY)#" null="#isCITYNull#" />,
       COMMENTS = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMMENTS)#" null="#isCOMMENTSNull#" />,
       ABUNDANCE = <cfqueryparam cfsqltype="cf_sql_timestamp" value="#MEETINGDATE#" />,
       MTGT = <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MTGT)#" null="#isMTGTNull#" />,
       STATE1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.STATE1)#" null="#isSTATE1Null#" />
    WHERE ENTID = #FORM.ENTID#
    </CFQUERY>
    <CFLOCATION URL="testht.cfm?begin=1">
    <cfelse>
    <cfset isCOMPANYNull = iif(len(trim(FORM.COMPANY)) EQ 0, true, false)>
    <cfset isSECTORS1Null   = iif(len(trim(FORM.SECTORS1)) EQ 0, true, false)>
    <cfset isRANKINGNull = iif(len(trim(FORM.RANKING)) EQ 0, true, false)>
    <cfset isPRICENull = iif(len(trim(FORM.PRICE)) EQ 0, true, false)>
    <cfset isDEPARTMENT1Null = iif(len(trim(FORM.DEPARTMENT1)) EQ 0, true, false)>
    <cfset isFIRSTNAMENull = iif(len(trim(FORM.FIRSTNAME)) EQ 0, true, false)>
    <cfset isPOSNull = iif(len(trim(FORM.POS)) EQ 0, true, false)>
    <cfset isPHONENull = iif(len(trim(FORM.PHONE)) EQ 0, true, false)>
    <cfset isEMAILNull = iif(len(trim(FORM.EMAIL)) EQ 0, true, false)>
    <cfset isMOBILENull = iif(len(trim(FORM.MOBILE)) EQ 0, true, false)>
    <cfset isADDRESSNull = iif(len(trim(FORM.ADDRESS)) EQ 0, true, false)>
    <cfset isCITYNull = iif(len(trim(FORM.CITY)) EQ 0, true, false)>
    <cfset isCOMMENTSNull = iif(len(trim(FORM.COMMENTS)) EQ 0, true, false)>
    <cfset isMTGTNull = iif(len(trim(FORM.MTGT)) EQ 0, true, false)>
    <cfset isSTATE1Null = iif(len(trim(FORM.STATE1)) EQ 0, true, false)>
    <cfset MEETINGDATE = trim(FORM.ABUNDANCE)>
    <!--- DATECFM --->
    <!--- ADD COMPANY QUERY --->
    <CFQUERY name="addcompany" datasource="tester">
    INSERT INTO COMPANY(
    COMPANY,
    SECTORS1,
    RANKING,
    PRICE,
    DEPARTMENT1,
    FIRSTNAME,
    POS,
    PHONE,
    EMAIL,
    MOBILE,
    ADDRESS,
    CITY,
    COMMENTS,
    ABUNDANCE,
    MTGT,
    STATE1
    VALUES (
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMPANY)#" null="#isCOMPANYNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.SECTORS1)#" null="#isSECTORS1Null#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.RANKING)#" null="#isRANKINGNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.PRICE)#" null="#isPRICENull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.DEPARTMENT1)#" null="#isDEPARTMENT1Null#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.FIRSTNAME)#" null="#isFIRSTNAMENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.POS)#" null="#isPOSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.PHONE)#" null="#isPHONENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.EMAIL)#" null="#isEMAILNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MOBILE)#" null="#isMOBILENull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.ADDRESS)#" null="#isADDRESSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.CITY)#" null="#isCITYNull#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.COMMENTS)#" null="#isCOMMENTSNull#" />,
    <cfqueryparam cfsqltype="cf_sql_timestamp" value="#MEETINGDATE#" />,
    <cfqueryparam cfsqltype="cf_sql_longvarchar" value="#trim(FORM.MTGT)#" null="#isMTGTNull#" />,
    <cfqueryparam cfsqltype="cf_sql_integer" value="#trim(FORM.STATE1)#" null="#isSTATE1Null#" />
    </CFQUERY>
    <!---DATE_FORMAT(datetime_field_name,'%Y-%m-%d');--->
    <CFLOCATION URL="testht.cfm?begin=1">
    </cfif>
    </cfif>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Sales</title> 
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="formst.css" type="text/css" media="screen" />
    </head>
    <cfdump var=#qnames#>
    <cfajaxproxy bind="javascript:myHandler({UsersGrid.COMPANY},{UsersGrid.SECTORS1},{UsersGrid.DEPARTMENT 1})"/>
    <script type="text/javascript">
      function myHandler(COMPANY,SECTORS1,DEPARTMENT1) {
          //update the link's href
          document.getElementById('myLink').href = 'http://www.google.com/search?q=' + COMPANY;
          document.getElementById('Linkedin').href = 'http://www.google.com/search?q=linkedin' + COMPANY;
          //update SECTORS1's selected
          var theField = document.getElementById('SECTORS1');
          for(var i=0; i<theField.options.length; i++) {
              if(theField.options[i].value==SECTORS1) {
                  theField.options[i].selected = true;
              } else {
                  theField.options[i].selected = false;
    </script>
    <!--- TOP --->
    <body>
    <div>
    <cfform name="SFORM" FORMAT="html"  width="1000" height="400" style="margin-left:140px;">
    <cfgrid name="UsersGrid"
               FORMAT="html"
               query="QNAMES" width="920" height="200" rowheaders="No" striperows="yes" striperowcolor="fefefe">
    <cfgridcolumn name="RANKING" width="40"header="Rank">
    <cfgridcolumn name="COMPANY" width="170" header="Company">
    <cfgridcolumn name="FIRSTNAME"  header="Contact Name">
    <cfgridcolumn name="POS" width="160" header="Position">
    <cfgridcolumn name="DEPARTMENTNOM" width="150" header="Department">
    <cfgridcolumn name="SECTORSNOM" width="120" header="Sectors">
    <cfgridcolumn name="ABUNDANCE" width="120" header="Action date">
    <cfgridcolumn name="SECTORS1" width="120" header="Action date" display="no">
    <cfgridcolumn name="PRICE" width="120" header="Action date" display="no">
    <cfgridcolumn name="PHONE" width="120" header="Action date" display="no">
    <cfgridcolumn name="EMAIL" width="120" header="Action date" display="no">
    <cfgridcolumn name="MOBILE" width="120" header="Action date" display="no">
    <cfgridcolumn name="ADDRESS" width="120" header="Action date" display="no">
    <cfgridcolumn name="CITY" width="120" header="Action date" display="no">
    <cfgridcolumn name="COMMENTS" width="120" header="Action date" display="no">
    <cfgridcolumn name="MTGT" width="120" header="Action date" display="no">
       </cfgrid>
    <!---FIRST--->
    <table width="880" class="stat" >
    <tr><td><cfoutput>#QNAMES.RecordCount# Companies</cfoutput></td></tr>
    <tr>
    <td>Company:<cfinput class="input" type="text" name="COMPANY" size="20" label="Company" required="yes"  bind="{UsersGrid.COMPANY}" ></td>
    <td>
    Sector:<cfselect class="input" name="SECTORS1" size="1" label="Sector" required="yes">
    <option></option><cfoutput query="industries"><option value="#SECTORSIDS#">#SECTORSNOM#</option></cfoutput></cfselect>
    </td>
    <td>Ranking:<cfinput class="input"  type="TEXT" name="RANKING" size="3" label="Ranking" bind="{UsersGrid.RANKING}" ></td>
    <td>Price:<cfinput class="input" type="TEXT" name="PRICE" size="3" label="Price" bind="{UsersGrid.PRICE}" >
    <a href="" id="myLink" target="_blank">Google</a>
    <a href="" id="Linkedin" target="_blank">Linkedin</a></td>
    </tr>
    <tr>
    <td>Department:<cfselect class="input" name="DEPARTMENT1" size="1" label="Department" required="yes">
    <option></option><cfoutput query="dNames"><option value="#DEPARTMENTIDS#">#DEPARTMENTNOM#</option></cfoutput></cfselect>
    </td>
    <td>Name:<cfinput class="input" type="text" name="FIRSTNAME" label="Name" required="yes" width="150" bind="{UsersGrid.FIRSTNAME}" ></td>
    <td>Position:<cfinput class="input" type="text" name="POS" label="Position" width="150" bind="{UsersGrid.POS}" ></td>
    <td>Phone:<cfinput class="input" type="text" name="PHONE" label="Phone" width="150" bind="{UsersGrid.PHONE}" ></td>
    </tr>
    <!--- THIRD--->
    <tr><td>Email:<cfinput class="input" type="text" name="EMAIL" label="Email" width="150" bind="{UsersGrid.EMAIL}" ></td>
    <td>Mobile:<cfinput class="input" type="text" name="MOBILE" label="Mobile"  bind="{UsersGrid.MOBILE}" ></td>
    <td>Address:<cfinput class="input" type="text" name="ADDRESS" label="Address"  bind="{UsersGrid.ADDRESS}" ></td>
    <td><cfselect class="input" name="CITY" width="80" size="1" >
    <cfoutput query="xity"><option value="#CITYID#">#CITYNOM#</option></cfoutput>
    </cfselect></td>
    </tr> 
    <!--- FOURTH --->
    <tr><td>Comments:<cftextarea class="input" name="COMMENTS" height="60"  label="Comments" bind="{UsersGrid.COMMENTS}" /> </td>
    <td>Action:<cfinput type="DateField" class="input" size="10" name="ABUNDANCE" label="Action"  bind="{UsersGrid.ABUNDANCE}" ></td>
    <td>Time:<cfselect class="input" name="MTGT" width="90" label="Time"><option>7:00AM</option></cfselect></td>
    <td><cfselect class="input" name="STATE1"  size="1" label="Action" >
    <cfoutput query="salesstep"><option value="#SALESID#">#SALESNOM#</option></cfoutput>
    </cfselect>  </td>
    <cfinput type="hidden" name="ENTID" label="ENTID" bind="{UsersGrid.ENTID}" >
    </tr>
    <tr> <td> 
    <cfinput type="submit" name="DELCOM" value="delete" class="button" >
    <cfinput type="submit" name="UPDATEADDBTN" value="UPDATE or ADD NEW" class="button"></td>
    </tr>
    </table>
    </cfform>
    <cfif isDefined("FORM.DELCOM")>
    <CFQUERY name="deletecompany" datasource="tester">
    DELETE FROM COMPANY
    WHERE ENTID = #FORM.ENTID#
    </CFQUERY>
    <CFLOCATION URL="testht.cfm">
    </cfif>
    </div>
    </body>
    </html>

  • CFAJAXPROXY: "The specified CFC proxy could not be found."

    {ColdFusion 8, latest, Windows.}
    The following statement occurs (in an included CFM file):
    <cfajaxproxy cfc="crv2_js" jsclassname="ServerProxy">
    The "crv2_js.cfc" file is indeed located in the same directory.  (If you request it at the same URL, and enter the administrator password, a nice formatted description of the library and its methods dutifully appears, so it is there...)
    But the error is:
    The specified CFC proxy could not be found.
    The path to the CFC must be specified as a full path, or as a relative path from  the current template, without the use of mappings.
    Looking also on the Administrator screen, I confirm that the directory is not mapped.
    Other, <cfinvoke> calls have been used to a sister CFC-library in the same directory without incident.  So I am confident that the message that I am seeing is somehow bogus ... but I do not yet know what sort of "bogosity" it must be.

    Now here is something I didn't expect to see.  When I turned on "extended error information" (or whatchamacallit...) I got this additional information in the displayed log:
    The specified  CFC proxy could not be found.
    The path to the CFC must be  specified as a full path, or as a relative path from the current template,  without the use of mappings.
    The  error occurred in C:\Inetpub\wwwroot\NCPT\CRV2\cr_PrototypeManager.cfm: line  235
                                        <cfgridcolumn
                                         name="DefinitionIsLocked"
    233 :                                     header="Is In Use"
    234 :                                     type="boolean"
    235 :                                     select="no">
    236 :                                                                 
    237 :                                    </cfgrid>
    (Ooh... formatted!  Now ain't that slick!)
    I took the liberty of pasting-in lines 231-232, which the debugging-output did not include.  In fact, here is the entire block of code:
    <cfgrid name="datagrid" pagesize="5" format="html" width="100%" height="200"
    "cfc:proxy.GridSource_ReviewPrototypes({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{c fgridsortdirection},getPageSize())">
    <cfgridcolumn
       name="ID"               
        header="ID"                
       display="false"    >
    <cfgridcolumn
       name="TemplateName"       
        header="Template Name" >
    <cfgridcolumn
       name="PrototypeClassName"   
       header="Prototype Class" >
    <cfgridcolumn
       name="Description"
       header="Description">
    <cfgridcolumn
       name="Enabled"
       header="Enabled"
       type="boolean">
    <cfgridcolumn
       name="DefinitionIsLocked"
       header="Is In Use"
       type="boolean"
       select="no">
    </cfgrid>
    So...  why on earth would an error like that be showing up at a place like this?  (Removing the "select='no'," on the wild-guess theory that it might be "the odd man out," as-expected had no useful effect.)
    My hypothesis here is that the "failure location" actually has nothing to do with anything:  this is simply the last clause in the CFGrid construct, and the computer is now trying to place a call to this function:
    <cffunction name="GridSource_ReviewPrototypes" access="remote" returntype="any">
      <cfargument name="page"                 required="yes">
      <cfargument name="pageSize"             required="yes">
      <cfargument name="gridsortcolumn"       required="yes">
      <cfargument name="gridsortdirection"    required="yes"> 
        <cfargument name="customPageSize"       required="no"     default="0">
    Uh huh... straight out of a demo.
    I thought I had just-now discovered the problem, as I was writing this, because the "bind" expression had two additional parameters which are not listed in <cfargument> tags.  But, much to my surprise, it didn't fix it.
    To be absolutely complete in my description:
    In an included header-file, we have:  <cfajaxproxy cfc="crv2_js" jsclassname="ServerProxy">
    On this (Windows) host, the file-name of the CFC file is "crcv2_js.cfc" and it is located in the same directory as both the cfm and the included cfm.
    In the <head> portion of the main page, we have (in an in-line <script> tag):    
    var proxy = new ServerProxy();
        proxy.setErrorHandler(showError);
        proxy.setCallbackHandler(handleResult);
    I'm starin' at this thing and starin' at this thing and everything I see is screamin' at me, "bogus!"    'Cept I know it can't be.
    The generated page-source code includes the following, including a bit which I have highlighted in bold face.  I don't know where that bit came from.
    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFAJAXPROXY');
    </script>
    <script type="text/javascript">
    var _cf_crv2_js=ColdFusion.AjaxProxy.init(
      '/CRV2/crv2_js.cfc','ServerProxy');
    but it does seem plausible since the URL to the site-page (on case-insensitive Windows) is, indeed: 
       http://tlcapps/crv2/cr_PrototypeManager.cfm
    and, again, if I type in  "http://tlcapps/CRV2/crv2_js.cfc" and prove that I do know the proper ColdFusion admin-password, I get a nice pretty-printed description of this library and its methods... including the one I am trying to call.  It does exist.

  • Cfajaxproxy component refresh issue

    I have several <cfselect>'s on a page, each of which
    are bound to cfc's returning the results of a query. When a
    selection is made on any one the the <cfselects> I want to
    repopulate the other <cfselects> using something like:
    <cfajaxproxy
    bind="cfc:documents.getOwners(arg_documentids={docform:templates@none},arg_tdates={docfor m:tdates@none},arg_hrns={docform:homes@click})"
    />
    (ie. clicking on the homes cfselect should repopulate the
    owners and dates <cfselects>. Debugging shows that the cfc's
    bound to the <cfselects> all run and return the correct
    results but the <cfselects> are never repopulated. Why? I
    thought binding the results of a query to a component would
    automatically refresh the component each time it is run.)
    The cf 8 documentation states: "A cfajaxproxy tag with a bind
    attribute does not refresh any control that is not specified in the
    bind expression." and I thought that is what I was doing by
    referencing each of the cfselects@none in the cfajaxproxy
    statement.
    I'm not sure what else to do to get the <cfselect>'s to
    refresh. Any thoughts?

    Bean code for LOV:
    public List<SelectItem> getAvailableBusinessUnits() {
    DCIteratorBinding buIter =
    ADFUtils.findIterator("GmBusinessUnitVO1Iterator");
    ViewCriteria vc =
    buIter.getViewObject().getViewCriteriaManager().getViewCriteria("ActiveGmBusinessUnitVC");
    buIter.getViewObject().getViewCriteriaManager().applyViewCriteria(vc);
    buIter.getViewObject().executeQuery();
    if (availableBusinessUnits == null) {
    availableBusinessUnits =
    ADFUtils.selectItemsForIterator("GmBusinessUnitVO1Iterator",
    "GmBusinessUnitId",
    "BusinessUnitName");
    return availableBusinessUnits;
    Bean code for the shuttle box:
    public void buCountryList(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    buId = valueChangeEvent.getNewValue().toString();
    DCIteratorBinding countryList =
    ADFUtils.findIterator("CountryOfVehSalesBasedLOVOnBUSecurityVO1Iterator");
    countryList.getViewObject().ensureVariableManager().setVariableValue("business_unit",
    buId);
    countryList.getViewObject().executeQuery();
    Thanks
    Abhishek

  • CFAjaxProxy Error

    Hi guys.
    I'm getting started with some ajax functions. so i had to look at cfajaxproxy.
    It look as it is very cool function but i don't get it work.
    I've got a directory with two files in it. cfAjaxProxy.cfm and proxy.cfc on the toplevel. There's no Application.cfc or something...
    so i'm calling the proxy.cfc with
    <cfajaxproxy cfc="proxy" jsclassname="proxy" />
    but then appears an error
    The specified CFC proxy could not be found.
    The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings.
    The error occurred in D:\www2\cfajaxproxy\cfAjaxProxy.cfm: line 1
    1 : <cfajaxproxy cfc="proxy" jsclassname="proxy" />
    2 :
    3 : <script>
    I'm now on CF9.
    I've googled around and read the reference a few times...
    Sorry for my bad english...
    regards.
    Maertsch

    Hi, thanks for your reply.. i'll give my best.
    i called proxy.cfc by the URL.
    proxy
    Component proxy
    hierarchy:
    WEB-INF.cftags.component
          proxy
    path:
    D:\www2\cfajaxproxy\proxy.cfc
    serializable:
    Yes
    properties:
    methods:
    reverseString, serverTime
    So seems that everything works fine. you see the path is also correct (same directory).
    Is this a problem with some mappings... I'm running on default Administrator setting and haven't mapped anything.

  • Cfajaxproxy

    I am getting coldfusion 8 ERROR using cfajaxproxy:
    "The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings."
    "The specified CFC vindexer_server_ver3 could not be found. "
    at line 2, in template="C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot\chapter0-2\vindexer_client.cfm"
    Any idea on how to fix this error?
    Also, in another thread, someone mentioned turning on "extended error information".  How do I turn this on?
    FACTS:
    I do NOT want to add a CFC mapping using coldfusion administrator because I am on a shared coldfusion hosting site (hostek.com).
    I can NOT change hosts at this time.
    Tested using firefox 3.6.17 and IE8
    I use jrun on my  "ColdFusion Server Standard 8,0,1,195765" test server
    In my test coldfusion server, I have "/dei-ideas_org" mapped to "C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot"
    In application.cfc I have the following;
        <!--- application.cfc mappings START --->
        THIS.mappings= {};
        THIS.mappings["/CFC_CustomTags"]= GetDirectoryFromPath( GetCurrentTemplatePath() ) & "inc\CFC_CustomTags";
        THIS.customTagPaths = getDirectoryFromPath(getCurrentTemplatePath()) & "inc\CFC_CustomTags" ;
        THIS.customtagpaths=ListAppend(THIS.customtagpaths, "inc\CFC_CustomTags");
        <!--- application.cfc mappings END --->
    I can access: http://192.168.1.128:8500/CFIDE/Scripts/wddx.js
    client template is located at:
      "C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot\chapter0-2\vindexer_client.cfm?cfdebug" aka
      "http://192.168.1.128:8500/dei-ideas_org/chapter0-2/vindexer_client.cfm"
    CFC (server template) is located at:
      "C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot\chapter0-2\vindexer_server_ver3.cfc" aka
      "http://192.168.1.128:8500/dei-ideas_org/chapter0-2/vindexer_server_ver3.cfc"
    if I go to url: "http://192.168.1.128:8500/dei-ideas_org/chapter0-2/vindexer_server_ver3.cfc?method=serverf n_ver3&arg_ver3=test_string&cfdebug",
        I do NOT get any errors.  I also do not get any data back, should I?
    /chapter0-2/vindexer_client.cfm source code:
    <!--- file: "/chapter0-2/vindexer_client.cfm" --->
    <cfajaxproxy cfc="chapter0-2.vindexer_server_ver3" jsclassname="vindexer_proxy_ver3" >
    <script>
    var myProxy_ver3=  new vindexer_proxy_ver3();
    function processClick() {
      var myArgStr_ver3= document.getElementById('form_arg_ver3').value;
      var result= myProxy_ver3.serverfn_ver3( myArgStr_ver3 );
      alert("the result from the server was" + result );
    </script>
    <cfform>
    <p>Enter form_arg_ver3:<cfinput type="text" name="form_arg_ver3" id="form_arg_ver3"></p>
    <p><cfinput type="button" name="f_btn_ver3" id="f_btn_ver3" onClick="processClick()" value="Get Data From Server"></p>
    </cfform>
    </body></html>
    <!--- file: "/chapter0-2/vindexer_server.cfc" ---><cfcomponent output="no">
    <cffunction name="serverfn_ver3" access="remote" returntype="string">
      <cfargument name="arg_ver3" type="string" required="false" default="Error No arg_ver3 Supplied" >         
      <cfset var retStr= "returned_data">
      <cfreturn retStr >
    </cffunction>
    </cfcomponent>
    /chapter0-2/vindexer_server.cfc source code:

    SOLVED: if Coldfusion 8, and have OnRequest() in application.cfc, this will not work --it is a  known cf8 bug.  For a workaround, see
    http://www.coldfusionjedi.com/index.cfm/2008/3/19/Ask-a-Jedi-Ajaxbound-requests-and-onRequ est

Maybe you are looking for