Hi All,
I have a application , which onclick of submit takes content in textarea and do some back end stuff and finally opens a .html in a iframe.
My problem is, the .html in iframe should change on each submit button in coresponding to the content in the textarea.... but its not, can anybody a suggest a solution for this?
function submit() {
var textAreaContent = $("#content").val();
var content = textAreaContent.substr(textAreaContent.indexOf('\n'),textAreaContent.length);
alert(content);
$.ajax({
type: 'GET',
url: 'submit.php?data='+content+'',
contentType: 'application/json',
dataType: 'json',
success: function(response) {
alert("Sucess");
},
error: function(response) {
alert("Error");
alert(response);
}
});
document.getElementById("ChromatinModel").src = "http://dna.engr.latech.edu/~kpc009/ICMGB/ICM/chromatin.html";
}
</script>
<iframe id="ChromatinModel" width="505" height="500" ></iframe>
Thanks,
Priya