B
Barry
I would like to be able to execute a client-side JavaScript function from an
ASP. NET page in order to pass a filename and number to a parent HTML page.
The parent page is only HTML so to do this I have opened the ASP. NET child
from the parent. This allows me to use the opener property from the
client-side JavaScript to do this. The ASP. NET form contains a datagrid
which will be used to select the correct filenames and numbers.
The reason for this is the parent HTML page contains an ActiveX control
which runs on the client side.
My problem is that I do not know how use the RegisterClientScriptBlock to
build the JavaScript with the correct filename and number and then execute it
from the server control. To work around this I have created a separate form
which works on the client side to allow the users to copy the filename and
select a number from a drop down list. This is a bad way to solve this but
it does work.
All the samples I have found have been related to creating confirmation
buttons or simple yes/no dialogs. Since this uses the data from the
datagrid, I cannot create this before the page is rendered.
<script language="JavaScript">
function sendimage(filename,layernum) {
opener.showimage(filename,layernum);
}
</script>
ASP. NET page in order to pass a filename and number to a parent HTML page.
The parent page is only HTML so to do this I have opened the ASP. NET child
from the parent. This allows me to use the opener property from the
client-side JavaScript to do this. The ASP. NET form contains a datagrid
which will be used to select the correct filenames and numbers.
The reason for this is the parent HTML page contains an ActiveX control
which runs on the client side.
My problem is that I do not know how use the RegisterClientScriptBlock to
build the JavaScript with the correct filename and number and then execute it
from the server control. To work around this I have created a separate form
which works on the client side to allow the users to copy the filename and
select a number from a drop down list. This is a bad way to solve this but
it does work.
All the samples I have found have been related to creating confirmation
buttons or simple yes/no dialogs. Since this uses the data from the
datagrid, I cannot create this before the page is rendered.
<script language="JavaScript">
function sendimage(filename,layernum) {
opener.showimage(filename,layernum);
}
</script>