cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open external website within HOPEX web front end

MEGA

Open external website within HOPEX web front end

️ Customize HOPEX to embed an external web page or website. In this video you will learn how to create a new menu on a object in web. You will learn to plug on this menu a call that open a panel in which you will find a website.

 

The macro of the HTML formatter :

 

When you have create the VB Script macro use this sample source :

 

Sub Generate(mgObject As MegaObject, Ctx As MegaWebSite, sIn As String, sOut As String)
Dim url As String
Dim title As String

title = "Google iFrame"

url = "http://www.iserefibre.fr"

strOut = strOut & "<html>" & vbCrLf
strOut = strOut & " <head>" & vbCrLf
strOut = strOut & " <title>" & title & "</title>" & vbCrLf
strOut = strOut & " </head>" & vbCrLf
strOut = strOut & " <body style=""{margin:0;padding:0;border:0;}"">" & vbCrLf
strOut = strOut & " <iframe height=""500"" width=""500"" frameborder=10 marginheight=10 marginwidth=10 scrolling=""true"" src=""" & url & """ >"
strOut = strOut & " </iframe>" & vbCrLf
strOut = strOut & " </body>" & vbCrLf
strOut = strOut & "</html>" & vbCrLf

End Sub

 

 

The macro of the Meta Command manager :

 

Sub CmdInvoke(oObject as MegaObject, intCmdNumber as Integer)
Dim strTitle, idAbsPage
Dim oRoot, panel
Set oRoot = mgobjSource.GetRoot
idAbsPage = "~Ao)iGbhhTreE[Open google inside HOPEX]" 'this is the html formatter
strTitle = "My page title"
Set panel= mgobjSource.CallFunction("~2pGyZ5)wCf30[AddPanel]", idAbsPage, strTitle , "")
'panel.Control = "SubPage"
panel.Show

End Sub

 

The option of the MetaCommand Manager :

 

[MenuItem]
CommandComponent = ~bn)iI0ihTr9F[Open Google in HOPEX Menu.Macro]
Picture = ~Or57oWJZFHLH[application_architecture]
Category = Action
IsAnywhere = 1
ShowOnObject = 1
ShowOnSelection = 1
Order = 110

 

 

 

Tags (2)