0

I wrote bookmarklet:

<a href="javascript:(function(src){if (typeof dentalBookmarklet != 'undefined') {dentalBookmarklet.init();return;}var script=document.createElement('script');script.async = true;script.type = 'text/javascript';script.src=src;document.getElementsByTagName('body')[0].appendChild(script);return;}('http://localhost:32152/Scripts/Pages/Areas/Widgets/Init.js'));">Go</a>

How you can see it dinamically load js-script to a page. It's works in Chrome, FF, IE (!!!), but doesn't works in Opera: "Linked script not loaded Init.js" Can someone tell me why?

viktor.kudria
  • 229
  • 2
  • 14

1 Answers1

1

Opera has a security restriction that blocks access to local sites (eg. localhost) from internet sites and vica versa. Put the script on a site with a address in the internet range and it should be fine.

Note that if this script is for your internal use only, you can disable this restriction with the opera:config#Network|AllowCrossNetworkNavigation setting.

Petter Nilsen
  • 476
  • 1
  • 5
  • 3