House of Fusion
Home of the ColdFusion Community
Hostmysite VPS Hosting

Search cf-talk

July 05, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

ColdFusion 8 Ajax questions

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
William Seiter
05/20/2008 12:56 PM

Hey all, I am currently embroiled with my first full coldfusion ajax system for a client.   I am running into a problem, which is probably elementary for those who have had some prior success with the cf ajax controls, but this has become a stumbling block for me.  Can anyone please give me their advice? I have a page with a cfdiv area on it.  When the user selects a name from a list, the cfdiv is populated by a form that contains the details for that name.  This is accomplished by an inline url bind parameter in the cfdiv tag.  this part seems to work properly. Once the user sees the detail form, I want them to be able to enter new data in the form and submit it.   When I use a simple html form (FORM), The entire application is reloaded and the new form appears in its place.  When I use a cold fusion form (CFFORM) I get a 'page cannot be found' error.   I have tried leaving the action parameter in the cfform tag blank (defaults to same page). I have tried setting the action parameter using cgi.script_name, (the location of the subpage from the root). I have tried setting the action parameter hardcoded as the same name as the sub-direcotry filename. All of these solutions have the same effect, 'The page cannot be found'.  The only change that produced a different result was changing the CFFORM to a FORM tag, which allows the page to be called correctly, however, it replaces the entire appication, not just inside the cfdiv. Please let me know if there is any details you might need to help me troubleshoot this issue.  All help will be greatly appreciated. William

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Azadi Saryev
05/20/2008 02:12 PM

try the following: make sure on the main page (that has the cfdiv you load the form into) you import the cfform tag with cfajaximport: <cfajaximport tags="cfform"> Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ William Seiter wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
William Seiter
05/20/2008 02:42 PM

I added this line and ran it and it didn't change the error.   I forgot to mention, however, that when I click on the submit button in the CFFORM in my browser, I first get the below error in a javascript alert window, and then the sitewide 404 handler loads inside the cfdiv area: "Error retrieving markup for element [div id] :Not Found [enable debuggin by adding 'cfdebug' to your URL parameters to see more information]" Thank you, William ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Azadi Saryev
05/20/2008 09:52 PM

that means there is an error in your code on the page that you load in the cfdiv, or a cfc that page uses... use cf ajax debugger to get full error: add ?cfdebug=true to the url of your main page to start ajax debugger after enabling it in cf admin. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ William Seiter wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Don L
05/20/2008 03:06 PM

----- Excess quoted text cut - see Original Post for more ----- William, you're a good guy.  I have an app that runs inside cfwindow, within it all sorts of ajax tags/functions including Inline Editing (never saw anything like that before, totally 'cooked up' by myself, which might have existed elsewhere berore).  I'd be happy to send you such source code (not in its entirety but maybe sufficient for your reference, email me donli at yahoo.com).   Also, I'd like to mention Sam Farmer got me started with cfajaxproxy, that's wonderful and I'm grateful to him for that. Don

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Holmes
05/20/2008 10:39 PM

Does this help? http://www.coldfusionjedi.com/index.cfm/2007/8/5/Reminder-about-forms-and-ColdFusion-8-Ajax-Containers On Wed, May 21, 2008 at 12:54 AM, William Seiter <william@seiter.com> wrote: > Hey all, > I am currently embroiled with my first full coldfusion ajax system for a client.  I am running into a problem, which is probably elementary for those who have had some prior success with the cf ajax controls, but this has become a stumbling block for me.  Can anyone please give me their advice? -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Cutter (CFRelated)
05/21/2008 06:18 AM

I would think it's an issue of pathing. If your primary template, with the cfdiv, is page A, and exists in one directory, and your secondary template, page B, exists in another, then your action attribute's template, page C, would have to be called in relation to page A, since page A is where it's actually being rendered. Unlike an iframe, you're calling this content to directly render as part of page A. It's a shot in the dark, but it's hit me in the past. Hope it helps. Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com William Seiter wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
William Seiter
05/21/2008 01:59 PM

Well, I wasn't able to figure it out.  I was able to learn alot about some things that are listed as 'should' work.  I will have to do some gradual testing in the future.  Make everything on one template and then start putting them into includes and then see how this effects the ajax system  (I can't imagine it should, but who knows) I did get the data to submit to the database in a different manner, which will work for now. I used a cfajaxproxy bind command which is activated by the click on the submit button.  To get the user interaction, I have a onMouseDown event that sets the button to show as 'being submitted' and then I use the same event to show the 'updated' text at the top of the cfdiv in <span>. this mimicks most of the behavior that i needed, but I will have to track back to this issue later to find out what the real issue was.   thank you all for your assistance.  I was able to find some great resources of infomation on this topic. > Hey all,


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists