http://Rick Posted September 17, 2015 Share Posted September 17, 2015 Good morning, I apologize in advance for my English. When you start up the browser, It turns a normally if the page is enter one of the domains , for example youtube but the problem appears when you upload the html file that is located in the resource. Please to code: Meta.xml: <meta> <script src="Show.lua" type="client" /> <html src="index.html" default="true" /> <file src="index.html" /> <file src="jquery-2.1.4.min.js" /> </meta> Clientside: local screenWidth, screenHeight = guiGetScreenSize() local window = guiCreateWindow(0, 0, screenWidth, screenHeight, "Webbrowser", false) local sx,sy = guiGetSize( window, false ) local browser = guiCreateBrowser(0, 0, sx/2, sy/2, false, false, false, window) local theBrowser = guiGetBrowser(browser) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(theBrowser, "https://www.youtube.com/?hl=es&gl=US") end ) local browser_2 = guiCreateBrowser(sx/2, sy/2, sx/2, sy/2, false, false, false, window) local theBrowser_2 = guiGetBrowser(browser_2) addEventHandler("onClientBrowserCreated", theBrowser_2, function() loadBrowserURL(theBrowser_2, "http://mta/html/index.html") end ) HTML: <html> <body> This resource is called <* httpWrite( getResourceName(getThisResource()) ) *> </body> <html> Link to comment
JR10 Posted September 18, 2015 Share Posted September 18, 2015 The tag is used for MTA's web interface. It uses a pre-processor to parse Lua code. The browser has no idea what the line means and will not parse it. Use https://wiki.multitheftauto.com/wiki/CE ... ipt_to_Lua Link to comment
Jusonex Posted September 24, 2015 Share Posted September 24, 2015 Also, the URL scheme in line 18 is not used correctly. Try this instead: loadBrowserURL(theBrowser_2, "http://mta/local/html/index.html") Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now