Presto.OnDemand.requireScript

ljschrenk
ljschrenk's picture
User offline. Last seen 8 weeks 2 days ago. Offline
Joined: 10/13/2008
Points: 82

Can you please post some examples of using multiple Presto.OnDemand calls?

I need to require several scripts before running my main code.  I tried nesting the calls but it's not working in IE.  I dont' want to include the files in mashlet.json because I have no idea what the property values should be.

TIA.

 

 

5
Your rating: None Average: 5 (1 vote)
djleon2001
djleon2001's picture
User offline. Last seen 4 weeks 1 day ago. Offline
Joined: 11/12/2008
Points: 80

TIA,

I highly recomend to use mashlet.json to load your mashlet resources.

The property value in mashlet.json could be any object , function name or variable that exist inside the script file , so Presto will wait for that object , function name or variable. Once Presto ( client side ) have recognized that in the browser's document  then it continues loading the next script file.

 

Javier Leon
Senior Sales Engineer
JackBe, Inc.  |  www.jackbe.com
1 (240) 744-7620

 

ljschrenk
ljschrenk's picture
User offline. Last seen 8 weeks 2 days ago. Offline
Joined: 10/13/2008
Points: 82

Can you please provide examples of using multiple Presto.OnDemand calls?

Also, if I did use mashlet.json, what would be the property value for including the ext 3.0 files?

kishores
User offline. Last seen 38 weeks 1 day ago. Offline
Joined: 09/22/2008
Points: 81

 You can use window.Ext or window.Ext.History as the property.

"js": [

                      {"script": "<url to ext-all.js>", "property": "window.Ext"},

]

Let us know if that works out.

Thanks,

Kishore

ljschrenk
ljschrenk's picture
User offline. Last seen 8 weeks 2 days ago. Offline
Joined: 10/13/2008
Points: 82

Worked like a charm. Thanks!