By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,644 Members | 2,439 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,644 IT Pros & Developers. It's quick & easy.

RegisterClientScript question

P: n/a
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>

Nov 22 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.