J
James Radke
Hello,
I am displaying an .ASPX page via windows.showModalDialog (to simulate a pop
up modal windows from a web page) from a javascript function and am
definining attributes to be passed to the modal dialog as follows:
function lineitemnotes(linnum, delnum) {
var myattributes = new Array(linnum,delnum)
var cRetValue =
window.showModalDialog("\LineItemNotes.htm",myattributes,"edge: raised;
dialogHeight: 37; dialogWidth: 35; center: yes; help: no; resizable:
no; status: no; scroll: no; toolbar: no;");
if (cRetValue != null)
{
__doPostBack('_ctl1$_ctl0$btnProcessNotes','');
}
}
Then in the web page that is presented in the pop up modial dialog window I
have
<script language=javascript>
function doInit() {
var linnum = "";
var delnum = "";
var MyArgs = new Array(linnum, delnum);
MyArgs = window.dialogArguments;
this.document.getElementById("lblLine").Text = MyArgs[0];
this.document.getElementById("lblDelivery").Text = MyArgs[1];
}
</script>
which is called from the BODY statement as follows:
<body MS_POSITIONING="FlowLayout" onload="doInit();">
Now for my question - the this.document.getElementById works, but I can not
set the .Text element? I want to set the label so that it shows the value
on the screen, AND so that I can reference that value (via the label
controls .TEXT property) when I execute other functions from the screen.
Can someone assist me and let me know how I can set the label controls
correctly from javascript?
Thanks!
Jim
I am displaying an .ASPX page via windows.showModalDialog (to simulate a pop
up modal windows from a web page) from a javascript function and am
definining attributes to be passed to the modal dialog as follows:
function lineitemnotes(linnum, delnum) {
var myattributes = new Array(linnum,delnum)
var cRetValue =
window.showModalDialog("\LineItemNotes.htm",myattributes,"edge: raised;
dialogHeight: 37; dialogWidth: 35; center: yes; help: no; resizable:
no; status: no; scroll: no; toolbar: no;");
if (cRetValue != null)
{
__doPostBack('_ctl1$_ctl0$btnProcessNotes','');
}
}
Then in the web page that is presented in the pop up modial dialog window I
have
<script language=javascript>
function doInit() {
var linnum = "";
var delnum = "";
var MyArgs = new Array(linnum, delnum);
MyArgs = window.dialogArguments;
this.document.getElementById("lblLine").Text = MyArgs[0];
this.document.getElementById("lblDelivery").Text = MyArgs[1];
}
</script>
which is called from the BODY statement as follows:
<body MS_POSITIONING="FlowLayout" onload="doInit();">
Now for my question - the this.document.getElementById works, but I can not
set the .Text element? I want to set the label so that it shows the value
on the screen, AND so that I can reference that value (via the label
controls .TEXT property) when I execute other functions from the screen.
Can someone assist me and let me know how I can set the label controls
correctly from javascript?
Thanks!
Jim