pgGotoURL

Help for using specific functions

Re: pgGotoURL

Postby Clifton » Fri Nov 09, 2018 8:00 am

The post from the 29th says at the end that you will require at least the PowerPac v14.9x to use the code as shown. The v14.9x PowerPac is the latest v15 beta series.

You can read about it here:
viewtopic.php?f=9&t=257
Clifton
Site Admin
 
Posts: 731
Joined: Tue Jan 14, 2014 1:04 am

Re: pgGotoURL

Postby John Robin Dove » Fri Nov 09, 2018 11:17 am

Sorry I was getting confused. What I meant was that your code would not work on your test page here https://pgsoftwaretools.com/powerpac/assessments/exec-js/index.html which has nothing to do with whatever version is on my computer! I don't know why this happened because today it is working perfectly. I may have copied the code incorrectly. I think this must be the explanation.

However I would like to use the code but I can't find a download address for version 15 or 14. If I load version 15 I would like to be able to revert to 14 if necessary. Your updating system hides everything away in temporary files.

John
John Robin Dove
 
Posts: 484
Joined: Thu Jan 23, 2014 4:35 am

Re: pgGotoURL

Postby Clifton » Fri Nov 09, 2018 11:25 am

The v15 beta (14.9x for now) is working pretty flawlessly for me. I'm working on a pretty large project with it where most XML files are being used and all seems fine. There are some handy enhancements to some functions which help on the XML side of things.

I will PM you with the link to download the v15 beta. If you have trouble with it in some area, let me know so I can explore the issue(s).
 
Clifton
Site Admin
 
Posts: 731
Joined: Tue Jan 14, 2014 1:04 am

Re: pgGotoURL

Postby John Robin Dove » Fri Nov 09, 2018 11:39 am

OK Fine. Thanks.
John Robin Dove
 
Posts: 484
Joined: Thu Jan 23, 2014 4:35 am

Re: pgGotoURL

Postby John Robin Dove » Tue Mar 12, 2019 12:05 pm

Hi Clifton,
I am still trying to deal with the problem of web pages that cannot be displayed in an iframe. I have created two systems. For pages that cannot be embedded I use a separate independent window. To distinguish between the two types of pages the user creating the exercise has to test them and then a marker is added to the data set. This works but it's not ideal. I wondered if there is any way the process could be automated. Could pgGotoURL return something to indicate that the page is unloadable? I realise that this pretty complicated and the conversations I have found on this topic don't seem very promising: https://stackoverflow.com/questions/18829234/determine-if-a-site-will-open-in-an-iframe
https://stackoverflow.com/questions/4548984/detect-if-the-iframe-content-has-loaded-successfully
Maybe I shall have to settle for my existing system. Let me know what you think.
John
John Robin Dove
 
Posts: 484
Joined: Thu Jan 23, 2014 4:35 am

Re: pgGotoURL

Postby Clifton » Sat Mar 16, 2019 10:27 pm

Hi John,
It seems you can embed google search in a ToolBook field by running pgGotoURL() and setting url = "https://google.com/search?igu=1"
I tried it and it works for me!

As an alternative, this works also:
url = "https://www.google.com/webhp?igu=1"

You won't be able to read data from the page without running into security issues, but at least you can embed the search results, etc.
Clifton
Clifton
Site Admin
 
Posts: 731
Joined: Tue Jan 14, 2014 1:04 am

Re: pgGotoURL

Postby John Robin Dove » Sun Mar 17, 2019 7:38 am

Thanks for your reply. Knowing how to modify the user's original google search string is a bit tricky but I have made some progress. I think the answer is always to insert ?igu=1 after the word search and link it to the rest with & but I'm still working on it.

This solves the problem for Google searches but not for all the other sites that are restricted in the same way. There are quite a few like this but also many that are not. I think the only way forward for me is to get the user to test the sites before adding them to the exercise. Back to square one!

I hope Firefox won't ask me to log in again. We shall see ...
John Robin Dove
 
Posts: 484
Joined: Thu Jan 23, 2014 4:35 am

Previous

Return to Function Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron