Neproify Posted June 5, 2015 Share Posted June 5, 2015 Hello, i'm trying to use bootstrap in my script, so I created this lua code: setDevelopmentMode(true, true) local screenWidth, screenHeight = guiGetScreenSize() local loginGui = GuiBrowser(screenWidth / 2 - 225, screenHeight / 2 - 210, 450, 420, true, false, false) local loginBrowser = loginGui:getBrowser() addEventHandler("onClientBrowserCreated", loginBrowser, function() loginBrowser:loadURL("html/login.html") showCursor(true) end) And this html code: <html> <head> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head> <body> <h1>Hello, world!</h1> <button class="btn btn-primary">Test</button> </body> </html> And it looks like that: http://prntscr.com/7dcuor So, bootstrap don't load. Anyone got this problem? Link to comment
Olle Risk Posted June 5, 2015 Share Posted June 5, 2015 Does it work in a normal browser? I understand this integrated browser is based on chromium but I also think external links are blocked for security reasons. Link to comment
Neproify Posted June 5, 2015 Author Share Posted June 5, 2015 In CEF presentation video, Jusonex used bootstrap in CEF for creating login GUI. In normal browser that works. Link to comment
Olle Risk Posted June 5, 2015 Share Posted June 5, 2015 Try downloading bootstrap then and include it from a local path, that might work as all the files will be on the same server. Link to comment
Neproify Posted June 5, 2015 Author Share Posted June 5, 2015 Okay, thank you. It works. To anyone who have this problem: Download bootstrap(and jquery) files, then paste them on server, add them in meta.xml. Use it in html with path like this: [url=mtalocal://bootstrap/bootstrap.min.js]mtalocal://bootstrap/bootstrap.min.js[/url] 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