This is a migrated thread and some comments may be shown as answers.

Tooltip not working Content Window

4 Answers 102 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 16 Oct 2007, 02:13 AM
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.

4 Answers, 1 is accepted

Sort by
0
Michele
Top achievements
Rank 2
answered on 18 Oct 2007, 05:18 PM
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>


0
Chris
Top achievements
Rank 1
answered on 18 Oct 2007, 07:47 PM
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.
0
Michele
Top achievements
Rank 2
answered on 18 Oct 2007, 09:33 PM
check out this sample...
www.checkmyweb.net/tooltip.zip

0
Chris
Top achievements
Rank 1
answered on 18 Oct 2007, 10:52 PM
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.
Tags
ToolTip
Asked by
Chris
Top achievements
Rank 1
Answers by
Michele
Top achievements
Rank 2
Chris
Top achievements
Rank 1
Share this question
or