Skip to main content
Inspiring
January 14, 2010
Question

Richtext fails with coldfusion.ajax.submitForm in IE

  • January 14, 2010
  • 3 replies
  • 1001 views

Hi all,

got a cfform containing a cftextarea with richtext = true, invoking the FCKeditor.  The form is inside a cflayoutarea and to maintain the page view I'm doing the calling forumAddPost to do the submission using coldfusion.ajax.submitform, processing it through a CFC method....shown below.

The CFC simply writes to the database and once returned, the handler navigates the layoutarea to the mainpage.

function forumAddPost() {

ColdFusion.Ajax.submitForm('formnewpost', 'groups.cfc?method=forumNewPosts', forumAddPostHandler, errorHandler);

}

function forumAddPostHandler(result) {

ColdFusion.navigate('forum_showtopics_search.cfm?subject_id=<cfoutput>#group.forumid#</cfoutput>&searchtext=', 'MOD2');

}
function errorHandler(code, msg)
{
alert('error '+code+': '+msg);
}

This code works fine in Chrome or Firefox, but in IE it fails and closes IE down.  If I remove the richtext option the posting works fine, so I've established it's something to do with the FCKeditor and the ajax posting method, but can't work out what?!

Anyone have any ideas?

Cheers

Phil

    This topic has been closed for replies.

    3 replies

    Inspiring
    January 15, 2010

    Hmmm...even on multiple submissions?

    For me it fails with IE6 running through XP Pro (company stills runs on this cr@p) and IE8 running through Vista Business with CF8 and the lastest fckeditor (2.5 I think).

    Further testing shows that if I take it out of the cflayout tabs then it works fine, so it looks like some issue between fck in a layout calling ajax...

    I'm getting a sneaky feeling my app may suddenly change design and lose the tabs if I can't sort this!

    Phil

    Inspiring
    January 15, 2010

    I was testing on IE8, Windows7 Starter.  I don't have IE6 available to test on.  Can test on IE7 a bit later on, but I have to fart-arse around with a VM to get it ready, so I'll do that after work.

    I tested multiple submits both via clicking between the tabs within one main "request" as well as multiple entire requests (like via refreshing the whole browser window).  I had no problems.

    I think you're being quite optimistic ot expect AJAX stuff to work reliably on IE6.  IE6 crashes.  That's what it's most famous for doing.  One needs to expect crashes if one pushes it (push it anywhere than out the window, that is).  And your client company's IT dept should be lined up against a wall and shot for still running it.  That's professionally negligent IMO.  But... you probably don't need to be told that.

    --

    Adam

    Inspiring
    January 15, 2010

    LOL I agree, show me the wall and hand me the gun ...still, doesn't explain the same issue with IE8/Vista (which they are starting to roll out...finger on the pulse huh! )

    Inspiring
    January 15, 2010

    Sorry for early bump - just desperate!

    Here is some example code  - it works fine in FF or Chrome and APPEARS to work fine in IE on the first run.  However, run it a second time and it will close all IE Browsers on submission.

    Just choose the Form tab, bung some stuff in the Richtext and submit the form - then choose the Something tab and repeat...

    I really hope you can help!

    Thanks

    Phil

    Inspiring
    January 15, 2010

    Works fine for me in IE...

    Which version of IE are you running?  What OS?

    --

    Adam

    Inspiring
    January 15, 2010

    bump...

    Inspiring
    January 15, 2010

    Firstly, it's pretty poor form to bump your posts within one day of making the original post.  But never mind.

    Can you create a simple, stand-alone reproduction case that demonstrates this, and post the code?

    --

    Adam