How I can use external JavaScript in my mobile project ?

Posted by ood.mns@hotmail.com on 19-Jun-2013 06:11

Hi,

I'm trying to use external javascript lib (mimic.js) in my mobile project.

And I found "User-defined resources" in App setting > External resources > User-defined resources

but when I add my external javascript file into this box and save my project, and then exit from mobile app builder,

my external javascript file disappear from User-defined resources !

PS. Have another way to use external javascript in mobile project ?

Any assistance appreciated.

Ood.

All Replies

Posted by Sanjeva Manchala on 19-Jun-2013 10:01

Hello Odd,

Can you confirm wheather external JavaScript file is added properly or not  from Progress Developer Studio for OpenEdge (PDSOE)? Go to the particular Mobile App from PDSOE and right click on Mobile App and select "Copy source local". After sources are copied to your local file system you can check wheather external java script file entry in the "home.html" file under src node (/src/home.html).

You can add external java script file from tiggzi in 2 ways:

1. The one you followed (App setting > External resources > User-defined resources)

2. Go to Create New > Java Script, you can find two options two add external Java Script resources like "Create from URL" or "Upload from file".

Hope this helps.

Regards,

Sanjeev.

Posted by egarcia on 19-Jun-2013 10:13

Hello Ood,

I tried adding external JavaScript libraries using the External Resources/User-defined Resources option. The path was not preserved after saving the project.

Could you contact Technical Support and report this issue?

As it was mentioned in another post, you can add JavaScript files to your project by creating a new JavaScript component and uploading the file or copying the content into a new file.

If you need to add JavaScript files from an external location, you can use the following workaround:


- Add HTML Panel component to your page.

- Specify HTML code with script tag.

Example:

  

I hope this helps.

Posted by egarcia on 19-Jun-2013 10:52

Hello Ood,

An engineer in my team pointed out that this issue has already been reported.

Thanks.

Posted by ood.mns@hotmail.com on 20-Jun-2013 00:16

Hi Sanjeev,

As your suggestion, I found my external javascript in home.html as below:

...

       
       
      
       
...

Additional information: I test call function in mimic with below:

...

var method = "list";
var request = new XmlRpcRequest("http://:/xmlrpc/db", method);

alert(after set request");

var response = request.send();
alert(response.parseXML());

...

The result is no alert "after set request".

Thanks,

Ood.

Posted by ood.mns@hotmail.com on 20-Jun-2013 00:27

Hi egarcia,

Yesterday, I request support to Technical Support and waiting for result.

Thanks,

Ood.

Posted by Sanjeva Manchala on 20-Jun-2013 09:18

Hi Odd,

If you are able to see the external java script file entry in the "home.js" file then your file is added succesfully. You are not able to see the external JS file you have added in external resources area because there is a bug already reported for that issue as Edsel mentioned in the other post .

Regards,

Sanjeev.

This thread is closed