wenjin_h
08-09-2004, 02:21 PM
I try to change the alert's message by script function. I tried couples of different way, none of them works. The following is the source code.
--------------------------------------
<canvas height="140">
<script>
<![CDATA[
function openAlert()
{
canvas.myalert.setVariable(text, "NEW");
canvas.myalert.setText("NEW");
canvas.myalert.text= "NEW";
canvas.myalert.content= "NEW";
canvas.myalert.open();
}
]]>
</script>
<alert name="myalert">OLD</alert>
<button onclick="openAlert()">Show Alert</button>
</canvas>
--------------------------------------
Does anyone know how to set the alert message at run time? Thanks.
--------------------------------------
<canvas height="140">
<script>
<![CDATA[
function openAlert()
{
canvas.myalert.setVariable(text, "NEW");
canvas.myalert.setText("NEW");
canvas.myalert.text= "NEW";
canvas.myalert.content= "NEW";
canvas.myalert.open();
}
]]>
</script>
<alert name="myalert">OLD</alert>
<button onclick="openAlert()">Show Alert</button>
</canvas>
--------------------------------------
Does anyone know how to set the alert message at run time? Thanks.