Tooltip not working Content Window

5 posts, 0 answers
  1. Chris
    Chris avatar
    120 posts
    Member since:
    Jun 2006

    Posted 15 Oct 2007 Link to this post

    I am having some issues with the tooltip control.  I have a page called default.aspx that uses Master.Master  .  In one of the content areas in my default.aspx page i have several <asp:LinkButton />'s  These links have a style applied to them so they work like rollovers links.  I would like to use each of these links to popup a tooltip that displays html.  Basically onhovering each of the links I would like to preview either a usercontrol or another webpage.  The hoverover tooltip will be a simple discription of what they are about to go to on click.   This function would be very similar to the example here:  http://www.telerik.com/DEMOS/ASPNET/Prometheus/ToolTip/Examples/LoadOnDemand/DefaultCS.aspx

    Anyone have any experience with this.  I could not follow the tutorials to make it work.
  2. Michele
    Michele avatar
    47 posts
    Member since:
    Dec 2006

    Posted 18 Oct 2007 Link to this post

    You can display an aspx page inside RadToolTip by setting an IFRAME element with SRC pointing to that ASPX between the RadToolTip tags, e.g.

    <telerik:RadToolTip ManualClose="true" Position="BottomRight" runat="server" ID="RadToolTip1" TargetControlID="link1" Width="250px" Height="300px" >
         <iframe src="Default2.aspx" style="width:100%;height:100%" frameborder="0" id="externalPage"></iframe>
    </telerik:RadToolTip>

    you can also pass data between the two pages like so...
    Example:
    default.aspx page

    <body>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server" />

    <telerik:RadToolTip ManualClose="true" Position="BottomRight" runat="server" ID="RadToolTip1" TargetControlID="link1" Width="250px" Height="300px" >

    <iframe src="Default2.aspx" style="width:100%;height:100%" frameborder="0" id="externalPage"></iframe>

    </telerik:RadToolTip>

    <asp:LinkButton ID="link1" runat="server">LinkButton</asp:LinkButton>

    <input type="button" onclick="PassValue()" />

    <input type="text" id="mainInput" value="sample content" />

    <script type="text/javascript">

    function PassValue()

    {

    var iframe = document.getElementById("externalPage");

    if(iframe)

    {

    iframe.contentWindow.document.getElementById("dialogInput").value = document.getElementById("mainInput").value;

    }

    }

    </script>

    </form>

    </body>






    default2.aspx page

    <body>

    <form id="form1" runat="server">

    <div id="Dialog">

    <input type="text" id="dialogInput"/>

    <input type="button" onclick="PassValueToMain()" />

    <script type="text/javascript">

    function PassValueToMain()

    {

    window.parent.document.getElementById("mainInput").value = document.getElementById("dialogInput").value;

    }

    </script>

    </div>

    </form>

    </body>


  3. Chris
    Chris avatar
    120 posts
    Member since:
    Jun 2006

    Posted 18 Oct 2007 Link to this post

    I like your suggestion, but I must have something else going on.  I tried both of your examples (copied exactly what you have) and my tooltip did not work. There seems to be a javascript problem.  So basically I cannot get even the most simple tooltip to work.
  4. Michele
    Michele avatar
    47 posts
    Member since:
    Dec 2006

    Posted 18 Oct 2007 Link to this post

    check out this sample...
    www.checkmyweb.net/tooltip.zip

  5. Chris
    Chris avatar
    120 posts
    Member since:
    Jun 2006

    Posted 18 Oct 2007 Link to this post

    Thanks for the example. That is perfect.  I made a rookie mistake.  For anyone else who has an issue with this tooltip not working at all:  I did not start my website as a AJAX Enabled-Website.  The directive to the assembly was not in my web.config for the script manager.  Even though I added a script manager to my page and the assembly was loaded to the top.  For some reason it still would not work.  I added the script manager assembly to the web.config just like it would be if I created the site from the start as an AJAX Enabled-Website.  Voila! everything worked.  Thanks again.
Back to Top