Azimuth Posted April 7, 2019 Share Posted April 7, 2019 Thank you for looking at this, I am pretty new to this, but an advanced programmer. I have code that creates a browser, and using a js that is linked inside of it, I can hit keys to make the browser visible. The problem is I would like to activate the browser using a command, and seemingly no matter what I do I cant seem to call an event inside the JS that is able to activate it, nor can I figure out how to activate it externally. This is the code that activates the browser inside my javascript that is referenced in the browser's index.html // Show menu. if ($('#wrapper').css('display') === 'none') { mp.invoke('focus', true); $('#wrapper').fadeIn(250); $('.draggable_window').each((index, item) => { if ($(item).data('active') === 'true') $(item).fadeIn(250); }); } Link to comment Share on other sites More sharing options...
noBrain Posted April 26, 2019 Share Posted April 26, 2019 I'm not sure if this will help but just add a command using mp.events in your server side then use player.call to trigger an event on your client then just listen for the event on your client and when it got triggered just create a new browser. Rmember to add functions that use mp.trigger into a seperated file than their listeners. I might be wrong but i had problems when did this Link to comment Share on other sites More sharing options...
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