Rad Window [ Modal]

8 posts, 2 answers
  1. A.mass
    A.mass avatar
    30 posts
    Member since:
    Apr 2009

    Posted 20 Apr 2009 Link to this post



    Hello everyone,

    I'm trying to make a sample page to see how RadWindow could be used.

    I dragged a RadScriptManager with ID = RadScriptManager1, then added a RadWindowManager to the page.

    and wrote the following code to pop-up the window when needed with some Info.

    // I tried both ways  
     
    RadScriptManager.RegisterStartupScript(this, RadScriptManager1.GetType(), "ALERT", "radalert('Testing RadWin!', 330, 100);", true); 
     
    //============================================================== 
     
    ScriptManager.RegisterStartupScript(this, RadScriptManager1.GetType(), "ALERT", "radalert('Testing RadWin!', 330, 100);", true); 

    but I'm getting the following javascript error.

    Microsoft JScript runtime error: 'this._windows.length' is null or not an object
    Microsoft JScript runtime error: Object doesn't support this property or method

    Any hint would really be appreciated.

    Thank you.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Apr 2009 Link to this post

    Hi Abdulla,

    Try the following code snippet and see whether it is working fine.

    CS:
     
    protected void Button1_Click(object sender, EventArgs e)  
    {  
        RadScriptManager.RegisterStartupScript(this, RadScriptManager1.GetType(), "ALERT""<script type='text/javascript'> Sys.Application.add_load(function(){radalert('Testing RadWin!', 330, 100);})</script>"false);  

    Thanks,
    Princy.
  3. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 22 Apr 2009 Link to this post

    Hello Abdulla,

    This error occurred in previous versions of the control when the RadWindowManager was Ajaxified in some way. Please either upgrade to a recent version of the control (the current one is Q1 2009 SP1) or exclude the RadWindowManager from ajaxification.

    If you still experience problems, it will be best to open a support ticket and send us a small sample project so we could examine your exact setup and logic.

    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Jerry
    Jerry avatar
    14 posts
    Member since:
    Oct 2007

    Posted 08 May 2009 Link to this post

    Hello,

    I have exactly the same issue and I am using 2009.1.402 version.  Could you please tell me where I can find SPI?  It is not in my account's download page.

    thanks,

    Jerry
  5. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 11 May 2009 Link to this post

    Hi Jerry,

    2009.1.402 is Q1 2009 SP1. Please open a support ticket and send us your application or a sample one where this issue could be reproduced. Just make sure that the project can be run locally and attach it to the ticket - we will check it right away.


    All the best,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Wveimar
    Wveimar avatar
    14 posts
    Member since:
    Dec 2008

    Posted 18 May 2009 Link to this post

    I'm facing the same problem.  I decide to use Sys.Application.add_load which solves the javascript error pointed in this post.  This solution causes another problem:  every time the user causes a postback on the page, Sys.Application.add_load event stacks the generated messages so the user receives how many messages as how many times he causes postbacks on the page.
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 19 May 2009 Link to this post

    Hello Wveimar,

    You could use the following approach in your solution:
    function f()  
    {  
        //code 
        Sys.Application.remove_load(f);  
    }  
    Sys.Application.add_load(f);  

    More information on the subject is also available in the following blog post:
    http://blogs.telerik.com/blogs/09-05-05/executing_javascript_function_from_server-side_code.aspx

    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Wveimar
    Wveimar avatar
    14 posts
    Member since:
    Dec 2008

    Posted 19 May 2009 Link to this post

    Thanks Georgi, with your post i solve the problem.  Although there's a workaround solution to the same issue, which consists in add two RadWindowManager, one of them ajaxified (inside a RadAjaxPanel), and the other in the top of the page (outside the RadAjaxPanel).  Obviously, your solution is better.
    :)
Back to Top