Commit fa3fc0cd authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use val() instead of text() to replace data in textarea.

parent f956ad8a
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
dream_instance.setGeneralProperties(data.general); dream_instance.setGeneralProperties(data.general);
dream_instance.initGeneralProperties(); // XXX dream_instance.initGeneralProperties(); // XXX
dream_instance.redraw() dream_instance.redraw()
$("#json_output").text(JSON.stringify(dream_instance.getData(), $("#json_output").val(JSON.stringify(dream_instance.getData(),
undefined, " ")); undefined, " "));
}; };
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
} }
// once the data is read, we can subscribe to every changes // once the data is read, we can subscribe to every changes
$.subscribe("Dream.Gui.onDataChange", function (event, data) { $.subscribe("Dream.Gui.onDataChange", function (event, data) {
$("#json_output").text(JSON.stringify(data, undefined, " ")); $("#json_output").val(JSON.stringify(data, undefined, " "));
jio.put({ jio.put({
_id: "dream_demo", _id: "dream_demo",
data: data data: data
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
dream_instance.runSimulation( dream_instance.runSimulation(
function (data) { function (data) {
if (data['success']) { if (data['success']) {
$("#json_result").text(JSON.stringify(data['success'], $("#json_result").val(JSON.stringify(data['success'],
undefined, " ")); undefined, " "));
// display demo graph. // display demo graph.
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
$.plot("#graph", series, options); $.plot("#graph", series, options);
} else { } else {
$("#json_result").effect('shake', 50).text(data['error']); $("#json_result").effect('shake', 50).val(data['error']);
} }
}); });
e.preventDefault(); e.preventDefault();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment