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

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

3 Answers 35 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 18 Oct 2011, 08:51 PM
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.

3 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 21 Oct 2011, 12:16 PM
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
0
Justin
Top achievements
Rank 1
answered on 24 Oct 2011, 10:52 PM
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
0
Justin
Top achievements
Rank 1
answered on 26 Oct 2011, 10:22 PM
I was able to get it dialed in so we can close it out.

Thanks!

Justin
Tags
Calendar
Asked by
Justin
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Justin
Top achievements
Rank 1
Share this question
or