This is probably a noob question.  I am using jquery, with the form plugin to
submit information, and the xmlExec plugin to handle responses.  As far as I
can tell, the form plugin works, and the xmlExec receives and deals with an
xml file.  It all seems to work, but what gets displayed on my screen has
been sanitized - amper-less-than-semicolon and amper-greater-than-semicolon
instead of <>.  I see what looks like source html displayed, instead of
properly-displayed markup.  It's not useful, and I can't track down where it
gets converted.  It looks like source html in both firefox and ie.  jquery
commands are displayed properly.  Again, as far as I can tell, the xml
(example shown below) arrives intact, and is processed by xmlExec.

------------------------------------------------------------------------------------------------------------
I have tried to pare down a source html file to the minimum.  An xml file
follows. btw, I am new to these forums.  Is it good form to quote huge
source files when replying?
------------------------------------------------------------------------------------------------------------

<html>
<head>
<script type="text/javascript"
src="plugins/system/cork/jquery/jquery.js"></script>
<script type="text/javascript"
src="plugins/system/cork/jquery/form.js"></script>
<script type="text/javascript"
src="plugins/system/cork/jquery/xmlExec-1.0.3.js"></script>
<script>
$(document).ready(function() {
        var options = {
                        before:   showRequest,  // pre-submit callback
                        after:    function(responseXML, responseText) {
                                $.xmlExec(responseXML);
                        }, // post-submit callback
                        dataType: 'xml'      
        };
       
        // bind form1 using 'ajaxForm'
        $('#myform').ajaxForm(options);
       
         // wire the 'Loading...' ajax indicator
        $('<div id="busy">Loading...</div>')
                        .ajaxStart(function() {$(this).show();})
                        .ajaxStop(function() {$(this).hide();})
                        .prependTo('#oops');
        $('#busy').hide();

        // pre-submit callback
        function showRequest(formData, jqForm) {
                        $('#output').html("Preparing to submit...");

                        // formData is an array; use $.param to convert it
to a string to display it
                        // (form plugin does this automatically when it
submits the data)
                        // alert('About to submit: \n\n' +
$.param(formData));
                       
                        return true; // here we could return false to
prevent the form from being submitted
        }
})
</script>
</head>
<body>
<div id="content">here is a content div
        <br>
        <form id="myform" name="myform" action="cork1.xml" method="post">
                <input type="text" id="name" name="name"
                value="asdf"> 
                <input type="submit"><br>
        </form>
        <br>
        </div>
        <div id="oops">was the oops div</div>
</body>
</html>

-------------------------------------------------------------------------------------
an xml example:

<root>
        <append select="#content"><![CDATA[
        <pre>here is stuff with
        carriage
        returns
        </pre>
        ]]></append>
        <append select="#oops"><![CDATA[here is stuff with breaks<br>kilroy
<br> was <br> here]]></append>
        <eval>alert(hi mom);</eval>
</root>

-- 
View this message in context: 
http://www.nabble.com/xmlExec---sanitized-output-tf2857111.html#a7982214
Sent from the jQuery Plugins mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to