by CarlitoGil » Sat Dec 14, 2013 2:40 am
Hey, I think this can be ready for 4.1 after all.
There are two methods for loading web pages to the ActiveX browser in MediaMonkey.
- .Interf.Navigate
- .SetHTMLDocument
It seems that ".SetHTMLDocument" is triggering some kind of quirks mode, because the same document works fine if loaded with ".Interf.Navigate"
When generating content with a script, ".SetHTMLDocument" is the one to use, so please, fix this.
Save this to the scripts Auto folder as
TEST_IE9.html
Code: Select all
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
span:first-child {text-decoration: underline;}
span:last-child {color: red;}
</style>
</head>
<body>
<span>This should be red</span>
</body>
</html>
Save this to the scripts Auto folder as
TEST_IE9.vbs
Code: Select all
Sub OnStartUp()
Dim oForm, sFile
sFile = Left(Script.ScriptPath, InStrRev(Script.ScriptPath,"\")) &"TEST_IE9.html"
Set oForm = SDB.UI.NewForm
With oForm
.Common.SetRect 0, 0, 300, 100
.FormPosition = 4
.Caption = ".SetHTMLDocument"
With SDB.UI.NewActiveX(oForm, "Shell.Explorer")
.Common.Align = 5
.SetHTMLDocument(oFSO.OpenTextFile(sFile, 1, False, 0).ReadAll)
End With
.ShowModal
End With
Set oForm = SDB.UI.NewForm
With oForm
.Common.SetRect 0, 0, 300, 100
.FormPosition = 4
.Caption = ".Interf.Navigate"
With SDB.UI.NewActiveX(oForm, "Shell.Explorer")
.Common.Align = 5
.Interf.Navigate(sFile)
End With
.ShowModal
End With
End Sub
Hey, I think this can be ready for 4.1 after all.
There are two methods for loading web pages to the ActiveX browser in MediaMonkey.
[list][*].Interf.Navigate[*].SetHTMLDocument[/list]
It seems that ".SetHTMLDocument" is triggering some kind of quirks mode, because the same document works fine if loaded with ".Interf.Navigate"
When generating content with a script, ".SetHTMLDocument" is the one to use, so please, fix this.
Save this to the scripts Auto folder as [b]TEST_IE9.html[/b]
[code]<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
span:first-child {text-decoration: underline;}
span:last-child {color: red;}
</style>
</head>
<body>
<span>This should be red</span>
</body>
</html>[/code]
Save this to the scripts Auto folder as [b]TEST_IE9.vbs[/b]
[code]Sub OnStartUp()
Dim oForm, sFile
sFile = Left(Script.ScriptPath, InStrRev(Script.ScriptPath,"\")) &"TEST_IE9.html"
Set oForm = SDB.UI.NewForm
With oForm
.Common.SetRect 0, 0, 300, 100
.FormPosition = 4
.Caption = ".SetHTMLDocument"
With SDB.UI.NewActiveX(oForm, "Shell.Explorer")
.Common.Align = 5
.SetHTMLDocument(oFSO.OpenTextFile(sFile, 1, False, 0).ReadAll)
End With
.ShowModal
End With
Set oForm = SDB.UI.NewForm
With oForm
.Common.SetRect 0, 0, 300, 100
.FormPosition = 4
.Caption = ".Interf.Navigate"
With SDB.UI.NewActiveX(oForm, "Shell.Explorer")
.Common.Align = 5
.Interf.Navigate(sFile)
End With
.ShowModal
End With
End Sub[/code]