w00t! Glad I could help! That command has saved my bacon before. :o)

Dylan Bass wrote:
Cheers right back at ya, Christopher. That's exactly what I needed, thank you. You get one free fish and beer lunch (it is Friday, after all).

On 3/2/07, * Christopher Jordan* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Dylan,

    Would using JSStringFormat
    <http://cfquickdocs.com/?getDoc=JSStringFormat> help?

    Cheers,
    Chris

    Dylan Bass wrote:
    I'm trying to write ajax functions that handle all of the
    'smarts' on the server-side and just use a simple eval() wrapper
    function to process the results.  The problem that I'm running
    into is one of nested "s and 's.

    For example, I'm trying to return:
    <cfset returnUI = "$('" & curSection & "').innerHTML = """ &
    javaScriptContent & """;">

    The problem is, that javaScriptContents contains things like:
                        onClick='
                            processEvent(
                                {
                                    status:\""Searching...\"",
                                    event:\""pdtSearchResults\"",
                                    sections:\""ppLeftContent\"",
dataOne:document.customCatForm.pdtSearch.value
                                }
                            );
                        '

    (Remember: ColdFusion will change those ""s to "s before sending
    the \" to javascript.)

    This works just fine if I call it via <cfinvoke> but since ajax
    also encodes the "s and 's, what I end up with client-side looks
    something like:
    _512_1172850456718 = "$(\'ppLeftContent\').innerHTML = \"<td
    align=\'center\'><img src=\'
    
http://www.blahblah.com/QuorumPromo/Common/Images/Selections/Q_PC_Tahoe_1.jpg\'
    
<http://www.blahblah.com/QuorumPromo/Common/Images/Selections/Q_PC_Tahoe_1.jpg%5C%27>><br>1000-1-6<br>Single
    Story/Font Door Chime Kit<br><input type=\'button\'
    onClick=\\\"doPkgAddPdt(\'1000-1-6\');\\\" value=\'Add to
    Package\'></td>";

    Needless to say, eval() doesn't like this one bit.  Is there a
    workaround that doesn't involve using a 'special string' for my
    "s and replacing it client-side before the eval()?

    This is the last piece to my little engine that can, any
    assistance to get this bit working would
    be very appreciated.
    //dylan

    ------------------------------------------------------------------------

    _______________________________________________
Reply to DFWCFUG: [email protected] <mailto:[email protected]> Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ <http://www.instantspot.com/>
      www.teksystems.com/ <http://www.teksystems.com/>

-- http://www.cjordan.us


    _______________________________________________
    Reply to DFWCFUG:
     [email protected] <mailto:[email protected]>
    Subscribe/Unsubscribe:
     http://lists1.safesecureweb.com/mailman/listinfo/list
    List Archives:
        http://www.mail-archive.com/list%40list.dfwcfug.org/
      http://www.mail-archive.com/list%40dfwcfug.org/
    DFWCFUG Sponsors:
     www.instantspot.com/ <http://www.instantspot.com/>
      www.teksystems.com/ <http://www.teksystems.com/>


------------------------------------------------------------------------

_______________________________________________
Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/
  www.teksystems.com/

--
http://www.cjordan.us

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.instantspot.com/
  www.teksystems.com/

Reply via email to