|
|
| Author |
Message |
CatalinB
Joined: 10 Dec 2009
Posts: 30
|
Posted: Fri Feb 12, 2010 4:01 pm Post subject: remote javascript files |
|
|
I'm trying to include a remote javascript file but I can't make it working (can't call any function/variable from it).
Could you provide a full example please? |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
Posted: Mon Feb 15, 2010 11:31 am Post subject: |
|
|
Which function are you trying to call from remote JS?
The only function to be called is Launch() function that should be assigned to a button/menu item |
|
| Back to top |
|
 |
CatalinB
Joined: 10 Dec 2009
Posts: 30
|
Posted: Mon Feb 15, 2010 12:15 pm Post subject: |
|
|
| Admin wrote: | Which function are you trying to call from remote JS?
The only function to be called is Launch() function that should be assigned to a button/menu item |
I have a javascript library containing several functions and variables. I want to be able to launch some functions when the page is loaded (Document complete event). |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
Posted: Tue Feb 16, 2010 6:43 am Post subject: |
|
|
We have tested with remote JS and DocumentComplete function, all works fine
http://www.besttoolbars.net/script.js
you should see an alert from DocumentComplete |
|
| Back to top |
|
 |
CatalinB
Joined: 10 Dec 2009
Posts: 30
|
Posted: Tue Feb 16, 2010 7:45 am Post subject: |
|
|
Well, I managed to see this alert. The problem is not with alerts, but with variables and functions. It would be more than good to have the possibility to access some already done functions and variables (maintained on a remote server).
For example, I wish to know if it's possible to use jQuery for instance and to have full benefit of this wonderful tools. |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
Posted: Tue Feb 16, 2010 8:30 am Post subject: |
|
|
I don't mean only alerts. You can put any function under DocumentComplete() to be called.
As for jQuery, you can use it in Bubbles and Banners. No guarantee it works in our Custom Scripts |
|
| Back to top |
|
 |
CatalinB
Joined: 10 Dec 2009
Posts: 30
|
Posted: Tue Feb 16, 2010 8:42 am Post subject: |
|
|
| Admin wrote: | I don't mean only alerts. You can put any function under DocumentComplete() to be called.
As for jQuery, you can use it in Bubbles and Banners. No guarantee it works in our Custom Scripts |
Ok, I got it. Do you think that's possible to access the MainWindow from Bubble or Banner using jQuery? |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
Posted: Tue Feb 16, 2010 9:07 am Post subject: |
|
|
| It depends on jQuery implementation |
|
| Back to top |
|
 |
CatalinB
Joined: 10 Dec 2009
Posts: 30
|
Posted: Tue Feb 16, 2010 9:16 am Post subject: |
|
|
| Admin wrote: | | It depends on jQuery implementation |
Would you be so kind to provide more details please?
I'm having this scenario: ok, the jQuerty is included in a html page that will be put in a banner in my toolbar. I want to access from this banner the object MainWindow.document.parentWindow. |
|
| Back to top |
|
 |
Admin Site Admin
Joined: 22 Aug 2006
Posts: 1055
|
Posted: Tue Feb 16, 2010 9:32 am Post subject: |
|
|
You can try to do it, but we cannot guarantee it will work.
In general, there is IExplorer=tool.explorer;
to address an HTML page opened in the browser from Bubble/banner. You can change colors on
the page, highlight specific words, make the page analysis and many other useful tricks.
The example below will change the background color of the page.
IExplorer.body.style.backgroundColor="#ff0000";
please, read our JS documentation for more information |
|
| Back to top |
|
 |
|