How to "Calling functions with a URL"

Discuss about Group-Office development here

Moderator: Developers

itsupport
Posts: 8
Joined: Tue Dec 10, 2013 11:37 pm

How to "Calling functions with a URL"

Postby itsupport » Thu Oct 02, 2014 3:59 am

We would like to imbed a URL into an email which would cause Group Office to be loaded in a web browser, the user then logs in, and then our module would load at a particular location in our module.

The page https://www.group-office.com/wiki/Calli ... with_a_URL indicates that you can call your module by calling "createExternalUrl" as in "GO::createExternalUrl('yourmodule', 'showDialog', array('aparameter'));", and then when a user uses the URL in their web browser, "This will call GO.yourmodule.showDialog("aparameter"); "

However we have not managed to get this to work.

In what file should "GO.yourmodule.showDialog("aparameter")" be placed in ? And how what does an example code look like?

Do you have any examples of how to use "createExternalUrl" and "showDialog" ? (which I could use as a guide, please).

We will investigate a bit further and maybe ask more specifically if noone has answered our query by then.
itsupport
Posts: 8
Joined: Tue Dec 10, 2013 11:37 pm

Re: How to "Calling functions with a URL"

Postby itsupport » Thu Oct 02, 2014 6:18 am

we have in partially successful, we can create a URL using "GO::createExternalUrl('pts', 'ShowDialog', array('5410'));".

This creates a URL, that will attempt to access the ShowDialog function when the user access the URL.

To get it working, I needed to create a file called ShowDialog.js within the PTS module (our in house module). I also had to update scripts.txt to call that function.

Within the ShowDialog.js, I have the following code:

GO.pts.ShowDialog = function(config){
if(!config)
{
config = {};
}
window.location = '/modules/pts/index2.php?goto=' + config;
}

This works, but it then bypasses the GO menus etc. So for it to work properly, I need to know how to change a module within javascript. I have done it before in PHP by setting the startmodule variable. However, in this case, I have no idea how to do it.

How do we get all of Group Office to load when a users clicks on the URL and the URL loads Group Office with our module, not just our module? I guess there is some kind of "load Group Office" method we can call, but we have been unable to determine what.


Thanks.
johnniewalk

Re: How to "Calling functions with a URL"

Postby johnniewalk » Mon Jun 15, 2015 12:25 pm

Hope i think i will work
edpl
Posts: 1
Joined: Sun Feb 09, 2020 4:33 pm
Location: india
Contact:

Re: How to "Calling functions with a URL"

Postby edpl » Sun Feb 09, 2020 4:43 pm

But ....
its not working
Monish
Posts: 1
Joined: Tue Apr 28, 2020 11:27 am

Re: How to "Calling functions with a URL"

Postby Monish » Tue Apr 28, 2020 11:28 am

Pyramidion Solutions is a leading outsourcing Mobile App development company which specializes in android, iOS,Website, Java development, web application development, blockchain development where trailblazing customizable software solutions are developed with agile methodology at unbelievably low cost.

Website:- [url]https://www.pyramidions.com/mobile-app-development.html[/url]
Project91
Posts: 1
Joined: Thu May 21, 2020 6:36 am
Location: Bulgaria
Contact:

Re: How to "Calling functions with a URL"

Postby Project91 » Thu May 21, 2020 6:37 am

Thank you!
kremahungry
Posts: 1
Joined: Tue Jun 02, 2020 2:41 pm

Re: How to "Calling functions with a URL"

Postby kremahungry » Tue Jun 02, 2020 2:42 pm

What a thread. Hahaha. A lot of "real users"
thinktankermark
Posts: 1
Joined: Fri Jul 17, 2020 2:32 pm
Contact:

Re: How to "Calling functions with a URL"

Postby thinktankermark » Mon Jul 20, 2020 7:14 am

That's what I am looking for. Thanks for sharing information.
JohnDove
Posts: 1
Joined: Wed Sep 16, 2020 11:36 am

Re: How to "Calling functions with a URL"

Postby JohnDove » Wed Sep 16, 2020 12:07 pm

When i face such problems i usually went to https://computools.com/consulting/. You can try this too

Who is online

Users browsing this forum: No registered users and 2 guests

cron