RegisterClientScriptBlock question

Discussion in 'ASP .Net Web Controls' started by Barry, Nov 18, 2004.

  1. Barry

    Barry Guest

    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>
     
    Barry, Nov 18, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian W
    Replies:
    1
    Views:
    2,924
    Yan-Hong Huang[MSFT]
    Jul 4, 2003
  2. Wes Weems
    Replies:
    1
    Views:
    414
    Ken Cox [Microsoft MVP]
    Jul 19, 2003
  3. John Livermore
    Replies:
    1
    Views:
    539
    Teemu Keiski
    Jul 25, 2003
  4. Scott
    Replies:
    0
    Views:
    407
    Scott
    Jul 27, 2003
  5. MS News
    Replies:
    10
    Views:
    3,111
    MS News \(MS LVP\)
    Aug 6, 2003
Loading...

Share This Page