Javascript vs. Javascriptlet

519 views
Skip to first unread message

kitze

unread,
Nov 30, 2013, 9:51:32 AM11/30/13
to tas...@googlegroups.com
Executing the simplest "flash('hello world');" in a javascriptlet is ok, but if i put it in a .js file and do the "javascript" task instead of a javascriptlet it doesn't work.

I'm using this as an example, actually i have a bigger javascript, and everything is working, the log is showing that the javascript is executing ok but i'm not getting the flash.

What could be the problem?

Pent

unread,
Nov 30, 2013, 12:15:31 PM11/30/13
to tas...@googlegroups.com
It wasn't clear to me whether you used exactly the same script in both instances (with no other code present) ?

Also try enabling Menu / Prefs / Misc / Popup Errors/Warnings to catch things like have the wrong filename.

Pent

kitze

unread,
Nov 30, 2013, 6:53:01 PM11/30/13
to tas...@googlegroups.com
I used exactly the same script, the filename is correct, i tried adding an alert and it works, just the tasker commands don't work and i have no idea why, the scriptlet with the same code works fine ...

Bob Hansen

unread,
Nov 30, 2013, 7:23:16 PM11/30/13
to tas...@googlegroups.com
Out of curiosity I decided to test it. It works correctly both as a javascriptlet and as a javascript file. Tasker 4.2u3.

kitze

unread,
Nov 30, 2013, 7:30:09 PM11/30/13
to tas...@googlegroups.com
Oh, i tested it again without any libraries and it's okay, but when i add the jQuery library as a link it doesn't work...

Bob Hansen

unread,
Nov 30, 2013, 7:52:20 PM11/30/13
to tas...@googlegroups.com
That I can confirm. It does not work when the jQuery library is specified.

Pent

unread,
Dec 1, 2013, 2:33:43 AM12/1/13
to tas...@googlegroups.com
OK, will try that. Thanks for the verification Bob.

Pent

Pent

unread,
Dec 1, 2013, 3:15:04 AM12/1/13
to tas...@googlegroups.com
Apparently there's a difference between this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script>

And this:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js" />

I don't know what it is, but the Tasker function definitions which follow after are available if I do it the first way and not the second way, so I've changed it for next version.

Pent

Bob Hansen

unread,
Dec 1, 2013, 9:02:59 AM12/1/13
to tas...@googlegroups.com
@kitze  Thanks for finding this!

@Pent  Thanks for the neverending support!
Reply all
Reply to author
Forward
0 new messages