Ouch .... that was stupid
and thanks for all your comments.

but the problem remains 

instead of 
"var customerid = qx.util.Json.parse(content);"

I tried
"var tabledata = qx.util.Json.parse(content);
customerid = tabledata;"

but didn't work 
Maybe you have working Code snippets concerned with this prob...

but all you comments are of course helpful and show me
how to look further!

thanks a lot to you all!
greets,

Ingrid  


-------- Original-Nachricht --------
> Datum: Mon, 10 Aug 2009 14:25:53 -0400
> Von: Derrell Lipman <[email protected]>
> An: qooxdoo Development <[email protected]>
> Betreff: Re: [qooxdoo-devel] Problems with reading out of data base

> On Mon, Aug 10, 2009 at 14:15, Ingrid Lohmann <[email protected]> wrote:
> 
> > Hi all,
> >
> > I'd like to write a login procedure. According to what a user puts in
> input
> > boxes(__tpassword,__tuser)
> > a qx.io.remote.Request is generated. If the login data is correct, the
> > request should return
> > the customerid of the user, but here the prob starts. The customerid in
> > line 13 is different to the one in line 21.
> > In line 13 the correct customerid is alerted whereas in line 21 the
> > customerid is 0 again.
> >
> > Think this is stupid beginner question, but I need a way to get data
> from
> > the DB I can
> > process within the program. Can say whats wrong here or give me
> ressources
> > /howtos in the net
> > in order to overcome this prob ...Thank you !
> >
> > 1    checkInput : function()
> > 2    {
> > 3        var customerid = 0;
> > 4        param =  "http://www.ourdomain.net/source/php/auth.php?pass=";
> > +this.__tpassword.getValue()+"&login="+this.__tuser.getValue();
> > 5
> > 6        var auth_proc = new qx.io.remote.Request(param);
> > 7        auth_proc.addListener("completed",
> > 8            function(e){
> > 9                try {
> > 10                    var content = e.getContent();
> > 11                    if (content.length > 0){
> > 12                        var customerid = qx.util.Json.parse(content);
> 
> 
> Right here on line 12, you just created a local variable within the
> anonymous function that's the listener for the "completed" event.
> 
> 
> > 13                        alert(customerid);
> > 14                    }
> > 15                }catch (e){}
> > 16                qx.bom.Cookie.set(newversion.Application.COOKIE_KEY ,
> > customerid );
> > 17                alert(customerid);
> > 18            }
> > 19        );
> > 20        auth_proc.send();
> > 21        alert(customerid)
> 
> 
> and here on line 21, you're displaying the local variable called
> customerid
> of function checkInput which was declared on line 3. Remove "var" from
> line
> 12 and you should get what you're looking for.
> 
> Derrell

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to