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

tooltip that prevents a user from opening an external browser window

7 Answers 81 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Chris Yoker
Top achievements
Rank 1
Chris Yoker asked on 14 Nov 2007, 02:34 PM
2007.2.1010.0
asp.net 2.0

hiya,


I have links on a site, some of them are to external sites.

I need to  prevent a user from opening an external browser window until they have read and acknowledged that it is an external site.

I was thinking of using a tooltip but then realised that the user might have clicked the link before  the tooltip kicks in.

Is it possible to disable the link and only allow the user to proceed when they've clicked "yes/no" within the tooltip?

Any suggestions?

It seems trickier than I first thought.

ta folks,

yogi



7 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 15 Nov 2007, 09:33 AM
Hi Chris Yoker,
Based on the information you have provided, I can offer you the following approach:

  1. Set ShowEvent for the RadToolTip to "OnClick". That way, when the user clicks the link, the RadToolTip will open, warning the user that he/she is about to open an external page.
  2. Handle the click event of the Yes button and redirect the page in that handler.
Best wishes,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris Yoker
Top achievements
Rank 1
answered on 15 Nov 2007, 05:59 PM
hiyaTsvetie,

Thanks for the reply.
I've got as far as..
setting the  ShowEvent for the RadToolTip to "OnClick".

However, when I click the link, it simply opens the new window regardless.I can confirm that the app is correctly set up for prometheus.

Here's my code below.I'm not sure what I'm doing wrong.
Does this make sense?

Many thanks,

yogi

<telerik:RadToolTip ID="RadToolTip2" runat="server"  Title="Blockstopper" 
                     TargetControlID="fer" ShowEvent="OnClick" 
                      ManualClose="true" 
                       
                     Sticky="true"  
                     IsClientID="false" 
                     RelativeTo="Element"  
                     Skin="Office2007" 
                     Position="MiddleRight" 
                     Text="Are you a <b>Blockstopper</b> customer?" 
                     ></telerik:RadToolTip> 
 
<id="fer" href="http://www.SoEasyEcom.com" runat="server">SoEasyEcom</a> 

0
Tsvetie
Telerik team
answered on 16 Nov 2007, 08:20 AM
Hi Chris Yoker,
Please add the following:

<id="fer" href="http://www.SoEasyEcom.com" onclick="return false;" runat="server">SoEasyEcom</a> 


Regards,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris Yoker
Top achievements
Rank 1
answered on 19 Nov 2007, 11:03 AM
Hiya Tsvetie,

Thanks for the reply.Ok, I now have a tooltip that displays when clicked.
At the moment, it only contains in an "X" in the top right hand corner.
I'm not sure how to get the radTooltip to display a "yes/no" option.

I think I'm nearly there but I'm stuck on this one.

Many thanks,

yogi
0
Tsvetie
Telerik team
answered on 20 Nov 2007, 12:10 PM
Hi Chris Yoker,
In case you want to do this with ASP Button controls, you can just add the buttons between the opening and closing tags of the RadToolTip control:
<telerik:RadToolTip ID="RadToolTip1" runat="server" Sticky="true" TargetControlID="Label1">  
    <asp:Button ID="btnOK" runat="server" Text="OK" /> 
    <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> 
</telerik:RadToolTip> 
 

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris Yoker
Top achievements
Rank 1
answered on 20 Nov 2007, 12:55 PM
hiya Tsvetie,

I don't want to do it with asp buttons.I mentioned in my initial post that I was using a link control.How can I add the yes/no functionality to the tooltip as you originally suggested?

Please let me know if I should clarify anything.

Many thanks,

yogi
0
Tsvetie
Telerik team
answered on 20 Nov 2007, 01:40 PM
Hi Chris Yoker,
I am afraid I do not understand the problem you have run into. In case you want to use link controls, then just add these link controls between the opening and closing tags of the RadToolTip control instead of the buttons.

Best wishes,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Chris Yoker
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Chris Yoker
Top achievements
Rank 1
Share this question
or