<br/> are being printed in plain text, instead of as HTML, is that correct?function elemUpdate() {
return function (next) {
for (var prop in docData) {
$('#'+prop).text(docData[prop]);
}
next();
}
}
.text(); this function translates HTML entities. If you want to display HTML, change the function to .html(). But then you'll have to make sure not to use HTML entities when you want to display text, such as <, > and &.Perfect, very glad you figured out what I meant, thanks!Ahh... you're trying to do line breaks in your fields, but HTML entities such as<br/>are being printed in plain text, instead of as HTML, is that correct?
The code I included in my advanced scripting tutorial is designed to do exactly this:
As you can see, it inserts the data asCode:function elemUpdate() { return function (next) { for (var prop in docData) { $('#'+prop).text(docData[prop]); } next(); } }.text(); this function translates HTML entities. If you want to display HTML, change the function to.html(). But then you'll have to make sure not to use HTML entities when you want to display text, such as<,>and&.