0

require error for UUID service

I would like this error scenario fixed


error message in firefox
O() is null

the code in the js file linked in the html file

function loadone(obj)
{
alert("loaded");
}
function pc(obj)
{
alert("waiting to load");
}


function okay()
{
var serviceSpecification = {service: "UUID",version: "1.0.0",minversion: "1.0.0", progressCallback: pc};
BrowserPlus.require(serviceSpecification,loadone);
}

okay();


this is the html file code

<html>
<head>
<script src="http://bp.yahooapis.com/2.1.11/browserplus-min.js"></script>
<script src="HU.js"></script>
</head>
<body>
</body>
</html>

1 Reply
  • Hi Monsignor,

    The parameters to require() are not quite right in your example. Try this:


    CODE
    function loadone() {
    alert("loaded");
    }

    function pc(obj) {
    alert("waiting to load: " + obj.totalPercentage + "%");
    }

    BrowserPlus.init(function(result) {
    if (result.success) {
    var serviceSpecification = {service: "UUID",version: "1.0.0",minversion: "1.0.0"};
    BrowserPlus.require({services:[serviceSpecification], progressCallback:pc}, function(result) {
    if (result.success) {
    loadone();
    }
    });
    }
    });



    Regards,

    Steve Spencer
    0
This forum is locked.

Recent Posts

in Support & General Questions