Jump to content
ADT

Open a site as a pop up??

Recommended Posts

I was wondering if there was a way to open a site as a window and not make it go full screen?

Just busy replacing our old bullying Frog 3 Form... with a nice shiny new Froglearn form!!  I had our old form opening as a pop up window....  and was hoping I could do something similar with this form!!

No doubt it'll involve a HTML brick... :P

Thanks in advance!!

Popup.gif

Share this post


Link to post
Share on other sites

I think this would help with navigation too as users still click the back button in the browser.

Share this post


Link to post
Share on other sites
On ‎04‎/‎07‎/‎2018 at 17:52, Graham Quince said:

@adamw or @Simon Law - is this possible?   I know there's a command to determine how an app launches, but is it possible to control if a site opens maximized?

Cough....  I really need to get something for this throat!!! :D

  • Haha 1

Share this post


Link to post
Share on other sites

This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,

FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid
});

You could run this off a button click or otherwise.

Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

Share this post


Link to post
Share on other sites
10 hours ago, pconkie said:

This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,


FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid
});

You could run this off a button click or otherwise.

Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

I thought this was going to be another conkie special....  till I got to the last bit!!!

I was after a way to open a site not maximised.... lol!!  But no doubt someone else might be able to use that code!! :P

Share this post


Link to post
Share on other sites

Bump.....  did any one ever come up with a fix for this???  Even @Graham Quince didn't get a response!!! :P

Share this post


Link to post
Share on other sites
On 10/07/2018 at 22:34, pconkie said:

This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,


FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid
});

You could run this off a button click or otherwise.

Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

 

Right,

Sorry about the delay in responding, super busy here at the moment (as always!). 

You could try something like this:

FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid,
  fullscreen: false,
  resizable: true,
  height: 500,
  width: 500
});

I've not tested this - but the code seems to look like it will accept those params. If not, I'll have to consult one of the front-end experts. Obviously you don't need to pass any params you're not using - for example assignment_uuid

  • Thanks 2

Share this post


Link to post
Share on other sites
4 hours ago, adamw said:

 

Right,

Sorry about the delay in responding, super busy here at the moment (as always!). 

You could try something like this:


FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid,
  fullscreen: false,
  resizable: true,
  height: 500,
  width: 500
});

I've not tested this - but the code seems to look like it will accept those params. If not, I'll have to consult one of the front-end experts. Obviously you don't need to pass any params you're not using - for example assignment_uuid

OK, so how do I actually use this? 😅 I am a non codey person!

Share this post


Link to post
Share on other sites
17 hours ago, pconkie said:

Thanks Conkie...  will give it a go when I get 5mins!!  Still recovering from San Fransisco...  and it’s harder looking after my own two than a class of 30!!!!  😉

Share this post


Link to post
Share on other sites

@pconkie finally found 5 mins to test this out.. I get a Malformed JavaScript Error ?

 

 

<button onclick="opensite()" class="btn btn-primary">Open</button>
<script>
    function opensite() {
        FrogOS.openSite({
        site: '/AAT/report_abuse/new_page/',
        fullscreen: false,
        resisable: false,
        height: 500,
        width: 500
     }):
    }
</script>

 

Share this post


Link to post
Share on other sites
14 hours ago, pconkie said:

You have a colon where a semi-colon should be!

 

<button onclick="opensite()" class="btn btn-primary">Open</button>
<script>
    function opensite() {
        FrogOS.openSite({
        site: '/AAT/report_abuse/new_page/',
        fullscreen: false,
        resisable: false,
        height: 500,
        width: 500
     });
    }
</script>

 

Share this post


Link to post
Share on other sites

Question - do I put this code on the site I want to open, or on the site that it is opening from?

Share this post


Link to post
Share on other sites

@pconkie well spotted... 😉

Share this post


Link to post
Share on other sites
1 hour ago, gbligh said:

Question - do I put this code on the site I want to open, or on the site that it is opening from?

opening from....

iow the button press will open the site you want to open.

Share this post


Link to post
Share on other sites
4 hours ago, pconkie said:

opening from....

iow the button press will open the site you want to open.

Thanks Paul. I’m currently in Spain so can’t try! Does it create a button?

Share this post


Link to post
Share on other sites

OK - so tried this and it doesn't seem to open the site. The button gets created, however does nothing.

@pconkie @ADT

Share this post


Link to post
Share on other sites
20 minutes ago, gbligh said:

OK - so tried this and it doesn't seem to open the site. The button gets created, however does nothing.

@pconkie @ADT

Had the same result........ only though Conkie did say it wasn't tested :(

Share this post


Link to post
Share on other sites
1 hour ago, ADT said:

Had the same result........ only though Conkie did say it wasn't tested :(

Looks like frog have tightened security in html widgets.  The function in the onClick of the button can't be found.  

Here is another way of doing the same thing....

<button data-name="open-site" class="btn btn-primary">Open</button>
<script>
  this.element.find("button[data-name=open-site]").click(function(e) {
    FrogOS.openSite({
      site:'/prcadm/d_t_lessons_in_year_8/',
      fullscreen: false,
      resizable: true,
      height: 500,
      width: 500
    });
  });
</script>

The site now opens when the button is pressed BUT....

The bit provided by @adamw to get it to open not fullscreen doesn't seem to work...

  • Thanks 1

Share this post


Link to post
Share on other sites
On 02/08/2019 at 21:15, pconkie said:

Looks like frog have tightened security in html widgets.  The function in the onClick of the button can't be found.  

Here is another way of doing the same thing....


<button data-name="open-site" class="btn btn-primary">Open</button>
<script>
  this.element.find("button[data-name=open-site]").click(function(e) {
    FrogOS.openSite({
      site:'/prcadm/d_t_lessons_in_year_8/',
      fullscreen: false,
      resizable: true,
      height: 500,
      width: 500
    });
  });
</script>

The site now opens when the button is pressed BUT....

The bit provided by @adamw to get it to open not fullscreen doesn't seem to work...

I'm on annual leave this week, and don't have access to the code, so I can't check it for you. I will have to refer you to @Graham Quince for now!

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.


×
×
  • Create New...