Controls Not Always Showing
I am creating pages with a custom control (a video player). After I'm finished with that, I go to view the page, and the control shows up perfectly. But when I go to preview or edit the page, the control disappears.
In other words:
localhost:8080/.../video_1 works fine.
localhost:8080/.../ does not.
localhost:8080/.../Edit does not.
When the pages themselves are created, we use the fluent API, but when adding the controls, we use the standard API. (Is that the correct term?) Would that have anything to do with it?
I can provide some code upon request.
Thanks,
Chris Aumiller
Whats the code look like for the player? The pageeditor doesn't allow javascript. Well if you use the SF JS embed control it'll disable it in edit mode...if the JS is linked in with a plain old script tag I think itll run.
Steve,
We actually use the flowplayer if you're familiar with that.
-Chris
Yep, I've used it before
In the InitializeControls section of the class, the following code is called:
var insertFlowPlayer =
string
.Format(
"$(document).ready(function () LB.Video.InsertFlowPlayer('0','1'););"
, targetId, objVideo.VideoURL);
// insert javascript into the startup placeholder to activate the player
var jsControl =
new
HtmlGenericControl(
"script"
);
jsControl.Attributes.Add(
"type"
,
"text/javascript"
);
jsControl.InnerHtml = insertFlowPlayer;
VideoPlayerStartup.Controls.Add(jsControl);
If you open the Chrome Console or Firebug console...any javascript errors?
Will have to look... working on another project at the moment and it's one of those things I can't switch midstream.
-CA
And I looked... no javascript errors.
-CA