1. In main.ape.js included following line:
include("examples/MySQLDemo.js");
2. File examples/MySQLDemo.js consists complete example code wth
changed ip, user name, password and database name in lines 18 and 25
3. Header part of initial html page looks like

<head>
    <script type="text/javaScript" src="../Clients/mootools-core.js"></
script>
    <script type="text/javaScript" src="../Clients/MooTools.js"></
script>
    <script type="text/javaScript" src="./config.js"></script>
    <script type="text/javaScript">
        var client = new APE.Client();
        console.log('Start');
        //Load APE client
        client.load();
        client.addEvent('load', function() {
            client.core.start({'name': '' + Date.now() + ''});//Start
with a random name
        });
        client.addEvent('ready', function() {
            //send getInfo command
            client.core.request.send('getInfo', {'user': 'efyx'});
            //onRaw info callback
            client.onRaw('info', function(params) {
                console.log(params);
            });
        });
</script></head>
4. config.js file looks following:
APE.Config.baseUrl = 'http://comp.domain.net/push'; //APE JSF
APE.Config.domain = 'domain.net';
APE.Config.server = 'ape.comp.domain.net:6969'; //APE server URL

(function(){
        for (var i = 0; i < arguments.length; i++)
                APE.Config.scripts.push(APE.Config.baseUrl + '/
Source/' + arguments[i] + '.js');
})('mootools-core', 'Core/APE', 'Core/Events', 'Core/Core', 'Pipe/
Pipe', 'Pipe/PipeProxy', 'Pipe/PipeMulti', 'Pipe/PipeSingle', 'Request/
Request','Request/Request.Stack', 'Request/Request.CycledStack',
'Transport/Transport.longPolling','Transport/Transport.SSE',
'Transport/Transport.XHRStreaming', 'Transport/Transport.JSONP', 'Core/
Utility', 'Core/JSON');

5. APE server is starting in no daemon mode and has no errors
6. When open html page in firefox, console reports error:
element is null
http://comp.domain.net/push/Clients/mootools-core.js
Line 1712

I'm working on slackware 12.2.

That is.

On Apr 2, 12:09 pm, Nicolas Trani <[email protected]> wrote:
> How did you have this error? What are you doing?
> angu a crit :
>
> > Hi,
>
> > I think that my additional problems depends on different linux
> > platform. Your last example is pretty good and clear. But now I'm
> > receiving a new error: 'element is null' in mootools-core.js Line
> > 1712.
> > Line 1712 looks like
> >   element.appendChild(context);
>
> > Could you explain, please, what does this error means?
>
> > On Apr 1, 4:26 pm, Nicolas Trani <[email protected]> wrote:
>
> >> Hi
>
> >> A client can't use the MySQL connection because it's too dangerous. But
> >> you can send data in a raw.
>
> >> I just wrote a sample article on the wiki to show how to connect to a
> >> MySQL server and exchange data with client :
>
> >>http://www.ape-project.org/wiki/index.php/Serverside_js_module_using_...
>
> >> Let me know if that's not clear enough!
>
> >> Regards.
>
> >> bes82 a crit :
>
> >>> Hi everybody, APE newbie here :)
> >>> I was looking at the serverside JS module using MySQL in the wiki...
> >>> that one is pretty clear but I'm wondering how a client can "use" the
> >>> connection created.
> >>> If I've got the point, the client can communicate with the server only
> >>> via Commands and Raws; do I have to register a command to use the
> >>> "sql" var of that example?
>
> >>> I've also read this previous discussion:
> >>>http://groups.google.com/group/ape-project/browse_thread/thread/c3420...
> >>> how can I "send" user's data to the server here?
>
> >>> Thanks

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

To unsubscribe, reply using "remove me" as the subject.

Reply via email to