0

I'm using jquery to update some node values in an xml document like this.

if (jQuery(this).find("TEXT").length > 0) {      
      jQuery(this).find("TEXT").val(Utilities.GetHtmlEncoded(jQuery('.update-action-text-input').val()));
}

I then need to then take that node and output to string to be posted to a server.

jQuery(xmlFinds.nodeArray).each(function () { 
            request_xml += this.outerHTML();            
});

The problem I'm having is the outerHTML is not updated with the new values. Anyone have an idea on how to get the node as an xml string?

1 Answer 1

1

val() sets the value property, which does nothing for the actual HTML.

For your rather special use case, you could use .attr('value', 'something') instead to update the attribute, and see the changes when you get the HTML back.

FIDDLE

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.