Oliver Watkins
Oliver Watkins

Reputation: 13489

Trying to add Qooxdoo widgets in html page

As a proof of concept I would like to show the some Qooxdoo widgets (which i find pretty nice) in a very simple index.html file.

Here I try to show a button :

<head>
    <title>Title</title>
    <script type="text/javascript" src="http://demo.qooxdoo.org/3.5/framework/q-3.5.min.js"></script>


    <script>

        var button = new qx.ui.form.Button("Hello...");
        this.getRoot().add(button, {left: 30, top: 20});

    </script>

</head>

If I run the above I get this :

Uncaught ReferenceError: qx is not defined

Is my library link correct? Or is it even possible to link qooxdoo javascript in a HTML file? We already have a large established javascript application, and we would like to just drop in qooxdoo widgets that we like. Not sure if that is possible though.

Upvotes: 0

Views: 550

Answers (1)

Martin Wittemann
Martin Wittemann

Reputation: 2116

You are including the qx.Website library and try to use qx.Desktop widgets. That ain't gonna work. Either you choose qx.Desktop and use the inline app approach [1] or you use the qx.Website widgets [2].

[1] http://manual.qooxdoo.org/current/pages/development/skeletons.html#inline

[2] http://demo.qooxdoo.org/devel/website-api/index.html#Accordion

Upvotes: 1

Related Questions