Azimuth

Running browser code from external

Recommended Posts

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);
  });
}

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.