You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 17th 2010, 8:41am

Javascript interface doesn't work on iphone HTML5?

Hi,

While playing around with the new features on iphone/android, I have found
out that Javascript doesn't seem to work on the iphone's Safari browser.
( Although it works fine on the Windows Safari browser)


Am I wrong or is there any other way to use Javascript interface on iphone?

Hyung

2

Wednesday, November 17th 2010, 11:46am

Hi,

can you show your example?

normally it should be working,
e.g. here an example:
http://krpano.com/examples/10812/example…lash-html5.html

does this work on your device?

best regards,
Klaus

3

Friday, November 19th 2010, 8:06am

Hi Klaus,

Strange.. Your example works fine on my iphone but my example still
doesn't seem work.

http://www.panosis.com/krpano/js/vr.html
(Cilck on the image in the center)


I am just trying to show a javascript alert message.

Source code

1
<plugin name="pic"        url="%HTMLPATH%/gui/pic.jpg"        keep="true"        enabled="true"        align="center"        x="0" y="0"scale="0.7"onclick="js(alert(kprano!));"        />


What could be wrong?

Best Regards,
Hyung

4

Friday, November 19th 2010, 9:25am

Hi,

you are directly calling a javascript native function (alert),
I think this is the problem, please try calling a javascript function from yourself,

best regards,
Klaus

5

Monday, November 22nd 2010, 9:34am

Hi Klaus :)

I have put the alert statement in my own function but still the same.
I just want to show an alert message in my panos.

I remember the alert function worked in pano2vr's html5 version.

Could you please check if there is an workaround any other solution?

Thanks in advance!

Best Regards,
Hyung

6

Monday, November 22nd 2010, 3:10pm

Probably you should leave at least one blank space between the attributes y, scale and onclick.

7

Monday, November 22nd 2010, 8:55pm

Hi,

first - only own defined javascript functions can be called,
calling javascript internal functions like "alert" is not supported,

and - there is a bug in the current version that converts the name of the called javascript function to lower case,
that means the name of javascript function must be lower case in the html file (this bug will be fixed in the next release),

best regards,
Klaus

8

Tuesday, November 23rd 2010, 7:33am

Hi Klaus,

so only user-defined javascript functions can be called on Mobile Safari! (although alert function works on other browsers like IE, Chrome, Firefox, Safari PC version)

about the lower case bug, no problem. I will use only lower-case until the next release of krpano :)

Best Regards,
Hyung

Similar threads