Sie sind nicht angemeldet.

freezyh

Anfänger

  • »freezyh« ist der Autor dieses Themas

Beiträge: 15

Wohnort: China

Beruf: study

  • Nachricht senden

1

Montag, 14. September 2015, 04:58

jsget function not work?

I useed jsget function ,but it not work?
the code


Get the address of the current webpage:

jsget(ret, 'location.href');
trace('location=', get(ret));




Let the user enter something:

jsget(passwort, 'prompt("Enter Password")');
if(password == 'hidden', ...);



Get the current date in the format YYYY-MM-DD:

jsget(date, 'new Date().toISOString().slice(0,10);');
trace('date=', get(date));

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Dienstag, 15. September 2015, 00:34

cause its not synchronous. and the trace command is firing before the jsget is set..

try a delayed call for your trace or a helper function that keeps running until its set, or another krpano.call action in your javascript jsget to have it synchronous.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Dienstag, 15. September 2015, 11:11

Hi,

the jsget() call is synchronous, but that action is new to 1.19-pr3, so make sure to use at least that version.

Best regards,
Klaus

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Dienstag, 15. September 2015, 16:08

You're right! I guess I figured someone would notice the unknown action error. Good to know!
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

freezyh

Anfänger

  • »freezyh« ist der Autor dieses Themas

Beiträge: 15

Wohnort: China

Beruf: study

  • Nachricht senden

5

Dienstag, 15. September 2015, 18:23

Hi,

the jsget() call is synchronous, but that action is new to 1.19-pr3, so make sure to use at least that version.

Best regards,
Klaus

my version is 1.83....,before the version of 1.19-pr3,the action is disable?

6

Mittwoch, 16. September 2015, 16:16

Hi,

the jsget() action is new since version 1.19-pr3,

in older version it isn't there and trying to call it will cause a warning in the krpano log.

Best regards,
Klaus

Ähnliche Themen