tooltip that prevents a user from opening an external browser window

8 posts, 0 answers
  1. Chris Yoker
    Chris Yoker avatar
    411 posts
    Member since:
    Jul 2005

    Posted 14 Nov 2007 Link to this post

    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



  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 15 Nov 2007 Link to this post

    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
  3. Chris Yoker
    Chris Yoker avatar
    411 posts
    Member since:
    Jul 2005

    Posted 15 Nov 2007 Link to this post

    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> 

  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 16 Nov 2007 Link to this post

    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
  5. Chris Yoker
    Chris Yoker avatar
    411 posts
    Member since:
    Jul 2005

    Posted 19 Nov 2007 Link to this post

    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
  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 20 Nov 2007 Link to this post

    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
  7. Chris Yoker
    Chris Yoker avatar
    411 posts
    Member since:
    Jul 2005

    Posted 20 Nov 2007 Link to this post

    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
  8. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 20 Nov 2007 Link to this post

    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
Back to Top