javascript in a window?
|
|
Hello, I’m having lots of trouble running separate javascript items in a window. I have a few scripts that I wanted to run in a window that didn’t work, here is one of them: <script src="http://static.mogulus.com/scripts/playerv2.js?channel=edited&layout=playerEmbedDefault&backgroundColor=0xffffff&backgroundAlpha=1&backgroundGradientStrength=0&chromeColor=0x333333&headerBarGlossEnabled=true&controlBarGlossEnabled=true&chatInputGlossEnabled=false&uiWhite=true&uiAlpha=0.5&uiSelectedAlpha=1&dropShadowEnabled=true&dropShadowHorizontalDistance=10&dropShadowVerticalDistance=10&paddingLeft=10&paddingRight=10&paddingTop=10&paddingBottom=10&cornerRadius=10&bannerURL=null&bannerText=edited&bannerWidth=320&bannerHeight=50&showViewers=true&embedEnabled=true&chatEnabled=false&onDemandEnabled=true&programGuideEnabled=false&fullScreenEnabled=true&reportAbuseEnabled=false&gridEnabled=false&initialIsOn=true&initialIsMute=false&initialVolume=10&width=400&height=400&wmode=window" type="text/javascript"></script> it it basically just an embed widget for an online TV thing, but it doesn’t show up in a window. Like I said this isn’t the only javascript that hasn’t worked. Any fix or anything I can do? I got rid of the ”<” because my post wasn’t showing up, is there a way to post code formatting? |
|
|
First to the code formating: just use the pre tag, e.g.: <pre> <script src="..."></script> </pre> Second to your question: what window type do you use? Static content, ajax or url? |
|
|
I was using ajax type |
|
|
So you used something like that?
win.setAjaxContent('content.html', {evalScripts:true});
|
|
|
It still doesn’t work for the above script, although i didn’t have the “evalScripts:true” before but it still doesn’t work. here is the code I’m using:
function mogulustest() {
mogulus = new UI.Window({
header: "pics",
height: 300,
width: 300,
left: 90,
top: 70,
hide: Element.blindUp,
}).show().setAjaxContent('test.html', {evalScripts:true, method: "GET", onCreate: function() {this.setContent('<div class="mainloading"></div>');}});
}
|
|
|
I just tried with your code and it works (I added an alert in text.html) |
|
|
thanks for checking :) an alert works for me too, but some some reason the script still does not get included: ttp://static.mogulus.com/scripts/playerv2.js?channel=edited&layout=playerEmbedDefault&backgroundColor=0xffffff&backgroundAlpha=1&backgroundGradientStrength=0&chromeColor=0x333333&headerBarGlossEnabled=true&controlBarGlossEnabled=true&chatInputGlossEnabled=false&uiWhite=true&uiAlpha=0.5&uiSelectedAlpha=1&dropShadowEnabled=true&dropShadowHorizontalDistance=10&dropShadowVerticalDistance=10&paddingLeft=10&paddingRight=10&paddingTop=10&paddingBottom=10&cornerRadius=10&bannerURL=null&bannerText=edited&bannerWidth=320&bannerHeight=50&showViewers=true&embedEnabled=true&chatEnabled=false&onDemandEnabled=true&programGuideEnabled=false&fullScreenEnabled=true&reportAbuseEnabled=false&gridEnabled=false&initialIsOn=true&initialIsMute=false&initialVolume=10&width=400&height=400&wmode=window" type="text/javascript"></script> it shows the video player when I just visit the “test.html” though, but it doesn’t appear when included in a window. |
|
|
I also have several other scripts that don’t work. Could the problem have something to do with certain javascript commands or something? |