# Login page example

**URL:** <https://forums.fusetools.com/t/login-page-example/6604>\
**Category:** How-to Discussions\
**Created:** [July 10, 2015, 6:15pm UTC](https://forums.fusetools.com/t/login-page-example/6604 "2015-07-10T18:15:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanmods](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@ryanmods](https://forums.fusetools.com/u/ryanmods)\
**Post date:** [July 10, 2015, 6:15pm UTC](https://forums.fusetools.com/t/login-page-example/6604/1 "2015-07-10T18:15:58Z")

</div>

can anyone show me an example of the code used to make a loginpage that works with parse as a backend and a register page because im struggling a lot with it please someone help 😃

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [July 12, 2015, 6:12pm UTC](https://forums.fusetools.com/t/login-page-example/6604/2 "2015-07-12T18:12:34Z")

</div>

Hi,

Please have a look a the new Examples section. We’ll soon be publishing an example of how to use Parse, but you can also just do this:

**EDITED TO REFLECT LATEST VERSION**

```auto
<JavaScript File="parse.js" ux:Global="Parse" />

```

Where parse.js is some version of Parse you downloaded from [parse.com](http://parse.com).

Then, to use Parse in your own scripts, do:

```auto
var Parse = require("Parse").Parse;

```

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [August 4, 2015, 8:58pm UTC](https://forums.fusetools.com/t/login-page-example/6604/3 "2015-08-04T20:58:35Z")

</div>

Anders Lassen: I try to implement this but I get this errors:

```auto
MainView.ux(10): E8001: 'JavaScript' does not have a property called 'Module'
MainView.ux(10): E8001: 'JavaScript' does not have a property called 'Id'

```

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [August 5, 2015, 5:29am UTC](https://forums.fusetools.com/t/login-page-example/6604/4 "2015-08-05T05:29:36Z")

</div>

Good Factory Dev: The synatx for declaring global modules changed in the latest verison.

I’ve updated my post to reflect the new syntax.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [August 5, 2015, 12:25pm UTC](https://forums.fusetools.com/t/login-page-example/6604/5 "2015-08-05T12:25:02Z")

</div>

I have have some problem to test a code… Im trying to make work this code (post a image in Parse) but only when I add this code:

```auto
<JavaScript File="parse-1.5.0.min.js" ux:Global="Parse" />

```

I get this errors:

```auto
MainView.ux(32): EUNKNOWN: 'DockPanel' is expected Line 32, position 13.
/Users/cristiankarmy/Desktop/cameraTest/CameraTest/MainView.ux(32): E8001: 'DockPanel' is expected Line 32, position 13.

MainView.ux: EUNKNOWN: 'DockPanel' is expected Line 32, position 13.

```

The entire code is:

```auto
    <App Theme="Basic" ClearColor="#eeeeeeff">
        <DockPanel>
            <StatusBarBackground DockPanel.Dock="Top" />
                  <JavaScript File="parse-1.5.0.min.js" ux:Global="Parse" />
                  <JavaScript>
                      var Parse = require("Parse").Parse;
                    var Observable = require('FuseJS/Observable');
                    var Camera = require('FuseJS/Camera');
                    var Parse = require("Parse").Parse;
                    Parse.initialize("APP ID", "JAVASCRIPT ID"); 
                    var ParseTask = Parse.Object.extend("fotos");

                    function MyFuction(args) {
                        Camera.takePicture({ targetWith:640, targetHeight:360, correctOrientation:true }).then(function(file) {
                          module.exports.imageFile.value = file;

                              var picture = new Parse.Object("foto");
                            picture.set("name", file.name);
                            var parseFile = new Parse.File(file.name, file);
                            picture.set(file, parseFile);
                            return picture.save();
                        });
                      }

                    module.exports = {
                      MyFuction: MyFuction,
                      picture: picture,
                      parseFile: parseFile,
                      imageFile: Observable(null)
                    };

                  </JavaScript>

                      <Panel Background="Red" Width="100%" Height="80." >
                          <Clicked Handler="{MyFuction}" /> </Panel>

                <Image File="{imageFile}" Width="100%" Height="100%" StretchMode="UniformToFill" />

        </DockPanel>
    </App>

```

There is something bad?

Thanks!

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [August 5, 2015, 12:51pm UTC](https://forums.fusetools.com/t/login-page-example/6604/6 "2015-08-05T12:51:16Z")

</div>

Good Factory dev:

You’ve uncovered a bug in our regex parsers that captures the JavaScript code out of the XML. Thanks 🙂 We will get this fixed for the next release.

As a work-around for now, simply move your global modules to the bottom of the file:

```auto
...

    <JavaScript File="parse-1.5.0.min.js" ux:Global="Parse" />
</App>

```

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [August 5, 2015, 12:56pm UTC](https://forums.fusetools.com/t/login-page-example/6604/7 "2015-08-05T12:56:52Z")

</div>

Great! Thanks!

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [August 5, 2015, 12:57pm UTC](https://forums.fusetools.com/t/login-page-example/6604/8 "2015-08-05T12:57:52Z")

</div>

Fix has been pushed. Next release will include it for sure 🙂
