> "P4tryk" <p4****@patryk.pl> wrote
<script>
function go()
{
getElementById("replaceContent").innerHtml=httpReq .text;
}
</script>
How to make the script from added innerHtml to run.
_______________________________________________
innerHTML is case sensitive, and getElementById is a
method of the document object.
The correct syntax would be:
document.getElementById("replaceContent").innerHTM L=httpReq.text;
-alu
_______________________________________________
ok, but how to make the script from the loaded page to run.
Patryk
_______________________________________________
You are using XMLHttpRequest to load an alert? You may be trying to kill a
mosquito with a sledgehammer here....
I can't say I understand the structure of your page(s), or the purpose of
loading the alert in the background(?).
You are asking how to make the script from the loaded page run - all I can
think of is that you are asking how to call the function itself, perhaps?
If this is the case, just call the function as below:
<script>
function go()
{
document.getElementById("replaceContent").innerHTM L=httpReq.text;
}
</script>
<div id="replaceContent"> </div>
<script>
alert("form request");
</script>
// somewhere in an appropriate place then, you would actually call the
function...
go();
Hope this solves the problem, if not, please explain clearly what you are
trying to achieve.
-alu