Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ScriptResource.axd

ScriptResource.axd

Scheduled Pinned Locked Moved Web Development
helpjavascriptdatabasequestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndreFratelli
    wrote on last edited by
    #1

    I'm not sure this post fits this board, but ... =\ I'm writting a page that calls a webservice through javascript and, now, I'm getting an error from ScriptResource.axd. I have even tryed rewritting the code causing the problem, but the error is the same. Error: i is not a function Line: 5 JS Code

    function apagar_utlz_m(id)
    {
    var tabela = document.getElementById(id);
    var tbody = tabela.getElementsByTagName('tbody')[0];
    var linhas = tbody.getElementsByTagName('tr');
    var j, checked, codigo_nome, ano_pass, obj;

    for (j=0 ; j<linhas.length ; j++)
    {
        obj = linhas\[j\];
        
        checked = obj.childNodes\[0\].childNodes\[0\].checked;
        codigo\_nome = obj.childNodes\[1\].childNodes\[0\].value;
        ano\_pass = obj.childNodes\[2\].childNodes\[0\].value;
        
        if (checked)
        {
            function Sucesso(r)
            {
                if (!r) alert('Erro: não foi possível apagar a entrada');
                else
                {
                    if (id == 'utilizadores') selectUtilizadores();
                    else selectM();
                }
            }
            if (id == 'utilizadores') cnc.servidor.deleteUtilizador(codigo\_nome, ano\_pass, Sucesso, ErroChamada);
            else cnc.servidor.deleteM(codigo\_nome, ano\_pass, Sucesso, ErroChamada);
        }
    }
    

    }

    The WebService methods "deleteUtilizador" and "deleteM" are both called (changes are made to the DB!), but "Sucesso" never runs, so I'm assuming the problem is related to this call. Can anybody help? Best regards

    Fratelli

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups