RegisterClientScriptBlock question

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top