[SOLVED] NUI Web Browser?

I was able to make my website open with the er, action menu resource but beyond that, I could not close it or resize it. So the webpage would be the only thing on the screen(fullscreen).I tried using a Window close() method on my website, but those don’t really work in the way I want it to. Are there any public versions of this that I’ve glanced over?

This isn’t a gigantic priority with me since there is always the steam browser. I don’t know much about lua(although I am learning) so it’s a little beyond me.

Anyone have a working one?

I don’t understand what you are trying to do?

1 Like

So with the ActionMenu I’d click say a button labeled whatever and it would open up a website in-game. I’ve gotten this part to work, but the issue I’m having is closing the browser.

So imagine say, I press F9 and I’m prompted with a menu. The menu lists something like Registration, CAD, blah, blah, blah whatever. I click it and the browser opens to the website of choice. Essentially the steam browser without breaking someone’s immersion. Were this possible I’d probably try and make it look like a CAD with a little laptop in the background while all it does is open something like openCAD. What I need is a way to close said browser.

Screenshots would probably better help me understand your issue. Is it just like using any NUI. You are losing me when you keep talking about the steam browser…

The issue is I can’t close the browser with out stopping the resource.

As it wasn’t created for nui. In some Java script that always runs check if ESC is pressed and post back to the Lua script and then from there close it

I have little idea how to do any of that, although I am learning. Hopefully, someone else takes an NUI browser project up because I can’t.

Are you using JQuery of some sort to show and hide it?

I took this [Release] ActionMenu [1.0.1] (Updated April 2018)

And added to the html

           <a href="http://cad.justiceroleplay.com">CAD</a>

That’s it. I didn’t create a new type of resource or anything so fantastic. I took someone’s resource and modified it.

Hm… Maybe this could be better to use an IFrame? It will have drag bars but you could add a close button to show (you already did that) and to hide?

Oo. I didnt think about that. Let me try that.

Just look at the nui tutorial with mouse control, the closing part is all you really need.

That worked. To a degree, for instance, websites like Google that use

X-Frame-Options: SAMEORIGIN

Will not work, and website likes Bubble.is will send an error message

Your browser was unable to load some necessary resources, contact your IT network administrator and ask him or her to allow access to 

 [insert multiple cloud fronts here]

So, thank you! It works to a degree with iFrames.

Darn… Hmm…

(20 chars)

I did make a little leeway on this. Uh with bubble, there was a setting you could change to make it work. Obviously couldn’t fix anything x-frame wise in iframes, unless I coded my own web browser. But since I hear that’s already in progress with FiveM, I learned lua and made a small scrip that displays iframes and or html. Thought I’d mention it since people are asking about bubble and iframes.

wao u can share source

I dont have it anymore.