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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.