Hi,How to detect if JavaScript is enabled after loaded HTML? Is it possible to detect it with krpano?
Greets,
Fernando.
Hi,How to detect if JavaScript is enabled after loaded HTML? Is it possible to detect it with krpano?
Greets,
Fernando.
if javascript is disabled, there is no krpano, because krpano is javascript :)
but there are html <noscript> tags,
to display a text if js is disabled.
https://www.w3schools.com/TAGs/tag_noscript.asp
this is already used in the standard html
generated by using one of the droplets
Thank index, but I remember a game with buttons that it contain js code. This buttons only works when javascript are enabled. Rare, I will check this old project and comment you.
Greets,
Fernando
Hi,
have a look into any of the krpano html files - there is a <noscript> element there - and the content of that element will be shown when Javascript is disabled.
With the default krpano html files the text 'ERROR: Javascript not activated' will be shown centered in the viewer window.
Best regards,
Klaus
Thanks Klaus and Index. Then as said Index:
if javascript is disabled, there is no krpano, because krpano is javascript
Then krpano always (flash too) is based javascript.
Then, for example, the klaus html_div example runs always if is loaded krpano, because javascript is enable. Never is loaded krpano without javascript enable-
Please confirm all the above
Greets,
Fernando.
Hi,
Then krpano always (flash too) is based javascript.
The embedding code is Javascript, so yes, without Javascript the krpano viewer will not get added to the webpage.
If you want you could additionally also embed the krpano.swf Flash viewer in the <noscript> via an <object> element, but I don't think that makes much sense - first when the user manually disables Javascript, then he probably doesn't want Flash too - and second - all the Browser workarounds and fixes to Flash that will be done by Javascript (e.g. the detection if Flash is even available or the mouse wheel support) are not available too.
Best regards,
Klaus
Thanks, I was confused. My old projects did not work in flash but in html5, that was the problem. The problem was not related to javascript. The solution is to avoid flash when in the code there is javascript:
<script>
embedpano({swf:"p1/tour.swf", xml:"p1/tour.xml", target:"pano", html5:"only", passQueryParameters:true});
</script>
My question now is:
Why keeping on working with Flash?
Greets,
Fernando
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!