Access TabStrip Object

6 posts, 0 answers
  1. BALA MUKUND
    BALA MUKUND avatar
    54 posts
    Member since:
    Oct 2012

    Posted 02 Jul 2008 Link to this post

    Hello,

    I have a main window which holds the TabStrip. Within this window I have an IFRAME. How can I access the TabStrip object from within the page of the IFRAME.

    Generally, to access an object in the parent I would do something like

    window.parent.document.getElementById(...)

    I want to get the ClientID of the TabStrip from the IFRAME so that I can enable disable tabs based on user selection from within the IFRAME page.

    Any help would be most appreciated.

    Thanks
    Bala
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 03 Jul 2008 Link to this post

    Hello BALA MUKUND,

    You can use the following code:

    var tabStrip = $get("frame1").contentWindow.$find("RadTabStrip1");

    where "frame1" is the ID of your iframe and "RadTabStrip1" is the tabstrip's id.

    I hope this helps,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. BALA MUKUND
    BALA MUKUND avatar
    54 posts
    Member since:
    Oct 2012

    Posted 03 Jul 2008 Link to this post

    Hello,

    The code snippet you have provided is has functions such as

    $get
    $find

    Maybe I am a little off here - I have never used them in JavaScript and I do get errors when I use them. Am I missing something?

    Thanks
  4. BALA MUKUND
    BALA MUKUND avatar
    54 posts
    Member since:
    Oct 2012

    Posted 08 Jul 2008 Link to this post

    Could someone please help me on those questions?

    Thanks
    Bala
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 09 Jul 2008 Link to this post

    Hello BALA MUKUND,

    Are you using RadTabStrip for ASP.NET and not the AJAX version?

    In case this is true, you can use the following code:

    document.getElementById("frame1").contentWindow.RadTabStrip1;

    where "frame1" is the ID of your iframe and RadTabStrip1 is the tabstrip's id.

    Best wishes,
    Simon
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. BALA MUKUND
    BALA MUKUND avatar
    54 posts
    Member since:
    Oct 2012

    Posted 09 Jul 2008 Link to this post

    Thanks! I don't use Rad Controls for AJAX. I guess that is why I was a little confused.

    Your answer helps clarify that. I was able to work this.

    Thanks once again.
    Bala
Back to Top