Customizng 'more' in the date tooltip popup v2009.2.701.35

4 posts, 0 answers
  1. Justin
    Justin avatar
    5 posts
    Member since:
    Oct 2011

    Posted 18 Oct 2011 Link to this post

    Howdy,

    I'm trying to call a javascript function from the ToolTip pop-up in the calendar control. 

    I have the calendar control's Display Template Path set to EventDetailDisplay.ascx

    Then in the EventDetailDisplay.ascx I have the 'more' link defined as:

    link = "<a style=\"float:right;\" href=\"\" onclick=\"HelloTemplate();\">more</a>";

    The HelloTemplate() JS method lives on the page that contains the calendar control. 

    For the life of me, I cannot seem to be able to call the HelloTemplate() JS method when I click on the more link in the tooltip popup. 

    If you can lend any insight into it I would really appreciate it.

    Thanks!

    Justin

    ps we are running v2009.2.701.35 of the webcontrols.

  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 21 Oct 2011 Link to this post

    Hi Justin,

    Do you use any Ajax on your page? If so try to wrap your code inside RadScriptBlock.
    Can you copy the rendered HTML that the browser gets and paste it here, so we could check if it correct. Also enable JavaScript debuging in your browser and tell us if you get any error.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Justin
    Justin avatar
    5 posts
    Member since:
    Oct 2011

    Posted 24 Oct 2011 Link to this post

    Howdy,

    Thanks!  So, here is the rendered script from the calendar page.  I'm trying to call a sanity check method called 'HelloTemplate()'

    
    
    Sys.Application.add_init(function() {
        $create(Telerik.Web.UI.RadToolTip, {"clientStateFieldID":"ctl00_cphContent_ekWebCalendar_InnerScheduler_ctl80_ctl01_description_ClientState","formID":"aspnetForm","skin":"Default","sticky":true,"targetControlID":"ctl00_cphContent_ekWebCalendar_InnerScheduler_ctl79","text":"\u003cdiv style=\"padding:10px;\"\u003eDescription: Some Desc...\u003cbr /\u003eLocation: City Of Lakewood\u003cbr /\u003eTime: 8:00 AM - 9:00 AM\u003cbr /\u003e\u003ca style=\u0027float:right;\u0027 href=\u0027\u0027 onclick=\u0027HelloTemplate(); return false;\u0027\u003emore\u003c/a\u003e\u003ca style=\"float:right;padding-right:4px;\" href=\"/WorkArea/WebCalendar/View/IcalGenerator.ashx?eventid=2147483773&langid=1033\"\u003edownload\u003c/a\u003e&nbsp;&nbsp;\u003c/div\u003e","title":"New City Event"}, null, null, $get("ctl00_cphContent_ekWebCalendar_InnerScheduler_ctl80_ctl01_description"));

    Here is the code from the EventDetailDisplay.aspx which is used by the calendar control for the tooltip.

    string link = "";
                if (!_ContentApi.RequestInformationRef.WorkAreaOperationMode)
                {
                    link = "<a style='float:right;' href='' onclick='HelloTemplate(); return false;'>more</a>";
                    description.Text = "<div style=\"padding:10px;\">" + desc + link + downloadlink + "</div>";
                    description.Title = EventData.DisplayTitle;
                    description.TargetControlID = title.Parent.Parent.Parent.ClientID;
                    description.IsClientID = true;
                }

    Thanks Much!

    Justin
  5. Justin
    Justin avatar
    5 posts
    Member since:
    Oct 2011

    Posted 26 Oct 2011 Link to this post

    I was able to get it dialed in so we can close it out.

    Thanks!

    Justin
Back to Top