Is It Possible To Open A C1Window From The Code Behind?

Posted by: khowell78737 on 10 September 2017, 11:31 am EST

  • Posted 10 September 2017, 11:31 am EST

    Using a scriptmanager,  I can make javascript functions to trigger from server-side.


    When triggered server-side, the javascript function I use to open a C1Window component does not find the  the control.


    The line: var w =  $find('<%=messageWindow.ClientID %>') fails


    Of course, the same code triggered from client-side sucessfully finds the control.


    I understand that I'm making the call from the server, but is there some method I'm missing to make this happen?


    It seems like there would be a server method to open the window, but I don't see any in the reference.


    Thanks,


    Kevin Howell


     


     


     

  • Replied 10 September 2017, 11:31 am EST

    Hello Kevin,


    You can set C1Window's server side 'ShowOnLoad' or 'ShowModalOnLoad' properties to true to show the window at run time.


    Regards,


    Richa

  • Replied 10 September 2017, 11:31 am EST

    Thank you for answering a year later, but this wasn't what I was asking.  I want to know how to use an asp scriptmanger to open a window from the codebehind on a page.


    I don't want the window to open on load, I want the window to open in response to a postback condition utilizing the asp scriptmanager control which injects javascript from the code-behind.  


    The problem was that the injected javascript does not find the control.  


    The script manager sucessfully triggers the javascript function, but the function does not find the control reference.  


    The SAME javascript function, triggered client side (e.g. using the onclick event on an a tag 'onclick=javascript:openWindow();') works.


    When using the script manager, the all the code in the javascript funciton runs EXCEPT the line that references the window.  


    WHY?

  • Replied 10 September 2017, 11:31 am EST

    Hello Kevin,


    I am unable to reproduce the issue at my end. Could you please provide a small sample reproducing the issue.


    ~Richa

  • Replied 10 September 2017, 11:31 am EST

    So you are telling me that you can successfully open a c1 window from an asp page's code-behind by calling the javascript function from a scriptmanager object?


    Would you show me the code you used?  Thats all I've been looking for is an example.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels