I am developing a management process to a database from a webservice and since the process takes more than 20 minutes I need to show the user messages in a <textarea>
in a part of the page, without updating the page for this place a javascript on the page that when executed adds a line of text (which happened by parameter) to said <textarea>
from a EventListener
that listens to the events that I generate from the code who is responsible for doing the management every time I want to show a message on screen.
The problem is that Javascript is never executed, and I'm calling it like this:
ClientScript.RegisterStartupScript(this.GetType(),"mandarmensaje", "Feed(\'" + sender.ToString() + "\');", true);
I already test the javascript by running from a button and if it works well and when I debug the command it "executes" without error but does nothing, and I put alert();
in the script to see if it at least comes in and neither.
The Javascript
<script type="text/javascript" language="javascript">
function Feed(msg) {
msg.replace(/@/g, "\r");
document.getElementById("feedbackText").value = document.getElementById("feedbackText").value + "\r" + msg;
}
</script>
The replace is because I pass line breaks like "@" and then I convert them again, so as not to have problems with the web interpreter.
I've been in this for 2 days, thanks to who can help me.