Neproify Posted June 5, 2015 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? Sorry for my english. I am from Poland.
Olle Risk Posted June 5, 2015 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. function be_remove() { printf("Too much gaming and too little sleep makes Olle wanna kill..."); be_remove(); }
Neproify Posted June 5, 2015 Author Posted June 5, 2015 In CEF presentation video, Jusonex used bootstrap in CEF for creating login GUI. In normal browser that works. Sorry for my english. I am from Poland.
Olle Risk Posted June 5, 2015 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. function be_remove() { printf("Too much gaming and too little sleep makes Olle wanna kill..."); be_remove(); }
Neproify Posted June 5, 2015 Author 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] Sorry for my english. I am from Poland.
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