Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Ajax Programming

Syntax problem with dojo and js. I want to return the ajax data from a function.

I have a js class with the follow function:

getValor: function(expr) {
            var teste = null;
            var bindArgs = {
            url:        'execexit',
            content : { method : 'execsql',
                        sql : 'select 10 as coisa from pocaauxi'

            mimetype:   "text/json",
            error:      function(type, errObj){
                            alert("Erro ao fazer request, tente
novamente em "
                            + "alguns minutos. " + errObj);
            load:       function(type, data, evt){
                            teste = data.colunas;
                            //I need to return this variable

            var requestObj = dojo.io.bind(bindArgs);

            //Always is null
            return teste;

I need the function getValor to return the ajaxData to another local
who I call this method..
But it alwyas return null. I tried in many ways, but withouth sucess. I
think I need to learn more javascript..

*'select 10 as coisa from pocaauxi'*

DO NOT DO THIS, you are allowing anyone to hack your database. Learn about
SQL injection!

You should be calling a function in the load with the data, return will not
work since you are dealing with async request. Look through Dojos


On 11/21/06, dudu <eduardopich@gmail.com> wrote:

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc