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

Tooltip Javascript Problem w/ MediaPlayer

6 Answers 93 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 06 Mar 2009, 06:17 AM
Hello. I have an interesting situation using the RadToolTipManager and asp:MediaPlayer. Here is the page I am working with:

http://www.mccsokinawa.com/dntestapps/

As you can see, when you mouse over an appointment on the RadScheduler, a pop-out tooltip shows a RadTabStrip, a MediaPlayer, and some text. The first time this tool-tip is loaded, everything shows just fine. However, as soon as you close the tooltip (use the X) or mouse-over another appointment for a new tooltip, a Javascript error takes place.

Any idea why this might be happening? Any idea how I can fix this in either Server-side or Client-side code? The controls load the first time, so I don't think it's anything server-side...

Any help would be much appreciated as always.

6 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 06 Mar 2009, 06:22 AM
Thought some code might help. It's very rough as I'm just trying to get a functional prototype built.

protected MediaPlayer GetMediaPlayer(string mediaFile)  
        {  
            MediaPlayer mp = new MediaPlayer();  
            mp.ID = "MediaPlayer1";  
            mp.Height = 240;  
            mp.Width = 320;  
            mp.MediaSkinSource = "~/Expression.xaml";  
            mp.EnableViewState = false;  
            mp.MediaSource = "http://www.mccsokinawa.com/tv/videos/ReportsToguchiMine.wmv";  
            mp.AutoLoad = true;  
            mp.AutoPlay = false;  
            return mp;  
        }  
 
        protected RadPageView GetPageVideoAndDescription(int exerciseID)  
        {  
 
            RadPageView page = new RadPageView();  
            page.ID = "RadPageView1";  
 
            string mediaFile = "ReportsToguchiMine.wmv";  
            MediaPlayer mp = GetMediaPlayer(mediaFile);  
            page.Controls.Add(mp);  
              
            Label lblMediaNote = new Label();  
            lblMediaNote.Text = "<div class=\"note\">Mouse over the screen and click play to start video</div>";  
            page.Controls.Add(lblMediaNote);  
 
            Label lblDescription = new Label();  
            lblDescription.Text = "<div id=\"ExerciseDescription\"><p>Video and description goes here</p></div>";  
            page.Controls.Add(lblDescription);  
 
            return page;  
 
        }  
 
        protected RadPageView GetPageNotes(int exerciseID)  
        {  
 
            RadPageView page = new RadPageView();  
            page.ID = "RadPageView2";              
            Label lblNotes = new Label();  
            lblNotes.Text = "<div id=\"ExerciseNotes\"><p>Notes go here</p></div>";  
            page.Controls.Add(lblNotes);  
            return page;  
 
        }  
 
        protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)  
        {  
              
            int exerciseID = 0; //need to somehow have this passed in  
 
            //add tabs  
            RadTabStrip tabs = new RadTabStrip();  
            tabs.ID = "RadTabStrip1";  
            tabs.SelectedIndex = 0;  
            tabs.MultiPageID = "RadMultiPage1";  
            tabs.Skin = "Black";  
            tabs.Tabs.Add(new RadTab("Exercise Info"));  
            tabs.Tabs.Add(new RadTab("Notes"));  
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(tabs);  
              
            //add pager  
            RadMultiPage pager = new RadMultiPage();  
            pager.ID = "RadMultiPage1";  
            pager.SelectedIndex = 0;  
 
            //get pages  
            RadPageView pv1 = GetPageVideoAndDescription(exerciseID);  
            RadPageView pv2 = GetPageNotes(exerciseID);  
 
            //add pages  
            pager.PageViews.Add(pv1);  
            pager.PageViews.Add(pv2);  
 
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(pager);  
 
        } 
0
David
Top achievements
Rank 1
answered on 08 Mar 2009, 10:43 PM
I could still use some help with this. :)

The error is "Invalid Pointer at line 3400" which I'm guessing is in reference to the Telerik.web.resource.axd since the page is only around 100 lines long.

An hour ago, I switched to an IFrame (which I really didn't want to do) and the video will work and close properly this way, however, I still get a bunch of Javascript errors. It's not the media player. It's something to do with the tooltip closing, I think.
0
David
Top achievements
Rank 1
answered on 09 Mar 2009, 11:23 PM
Alright, I'm getting really ticked off. We purchased the Telerik RadControls for ASP.NET AJAX knowing that there would be a learning curve with these controls, and we have been happy with the controls, but I have asked question after question on the forum without ever getting a response. Even a "What are you talking about?" would be better than this. Seriously, do I need to stick to support tickets and ignore the forum?

I have attempted to do things this way today (http://demos.telerik.com/aspnet-ajax-beta/tooltip/examples/targetcontrolsandajax/defaultcs.aspx) with the exact same results. Invalid pointer, line 3400.

I'm not going to even bother posting code until I get even a response... If I don't hear from anyone here, screw the forums. I'll stick to tickets. I wanted to support the community by working through problems here, but I guess I'll just be selfish since the response on a lot of threads just seems to be "create a support ticket"...
0
David
Top achievements
Rank 1
answered on 09 Mar 2009, 11:36 PM
The problem only happens when I have an asp:mediaplayer control. If I remove the control, the JavaScript error goes away.
0
Svetlina Anati
Telerik team
answered on 10 Mar 2009, 08:30 AM
Hello David,

Please, note that the forum threads are concerned to be public resources and we do not guarantee a timely response there. If you want to ensure that you will get a faster support reply, you should use support tickets - they have higher priority, based on their response time.

As to the problem with the media player I already answered your other thread and for your convenience I pasted my reply below. We debugged the provided page and we believe that the problem is not related to RadControls and RadToolTip. The issue occurs only under IE and it is not present under FF and it concerns some client code with a timer and this code has nothing to do with the RadToolTip's source code:

function(){this._timerCookie=window.setTimeout(this._tickTimerDelegate,200);var a=this.get_position();this._detectChapterChange(a);if(this._forceUpdate||this.get_currentState()==="Playing"){this._forceUpdate=false;this._ensurePosition(a)}}  
 

We assume that the problem can be reproduced without a RadToolTipManager control at all - just replace the tooltip with a standard update panel and test updating it few times in a row. After you reproduce the problem with the standard controls you should ask for support the vendors of those controls.

Regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David
Top achievements
Rank 1
answered on 10 Mar 2009, 10:45 PM
Ok, thanks. I'll stick to tickets when I need an urgent response.

For the mediaplayer, I'll just use an iframe. It works and it's painless. I'm not a fan of frames, but it works. The mediaplayer works everywhere for me (so far) aside from inside an actual tooltip, but maybe the same applies in an update panel. Thanks.
Tags
ToolTip
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or