开发者

stuck in this error on line 15 at column 19: AttValue: " or ' expected?

开发者 https://www.devze.com 2023-03-28 01:00 出处:网络
I am stuck in this error, it displays this message in Chrome, and I dont know what to do, I check the \"\", but nothing seems wrong any ideas????

I am stuck in this error, it displays this message in Chrome, and I dont know what to do, I check the "", but nothing seems wrong any ideas????

This page con开发者_高级运维tains the following errors:

error on line 15 at column 19: AttValue: " or ' expected
Below is a rendering of the page up to the first error.

this is my js

<script type="text/javascript" src="../js/mootools-1.2-core-nc.js"></script>
<script type="text/javascript" >
    window.addEvent('domready', function() {

        $$('a.delete').addEvent('click', function(e) {
         //  alert("me lleva");
           e.stop();
            var id_archivo = this.get('id');

            var nuevo = id_archivo.split('#');

            var DeleteFile = new Request({
                method: 'POST',
    //            data: 'id_archivo='+nuevo[1]+'&nuevo='+nuevo[0], 
   url: 'Controlador/ControladorBorrarArchivo.php? line15 id_archivo='+nuevo[1]+'&nuevo='+nuevo[0], line15
                onRequest: function() {},
                onSuccess: function() {
                //$("page_container").load.periodical(2000,this, 'ControladorListarArchivos.php');
                  //this.load.periodical(5000, this);
            //  $("page_container").load.periodical(5000,this,'Controlador/ControladorBorrarArchivos.php');

              //this.load.periodical(5000,this,'ControladorListarArchivos.php');
             // $("page_container").load.periodical(5000,this,'ControladorListarArchivos.php');

                },
                onFailure: function(){alert('Error!');}
        }).send();
    //        DeleteFile.send({ data: { 'archivo': id } });
        });
        });

    </script>


Please try this

window.addEvent("domready", function() {

    $$("a.delete").addEvent("click", function(e) {
       e.stop();
       var id_archivo = this.get("id");
       var nuevo = id_archivo.split("#");
       alert(nueovo.length); // must be 2 or more
       var URL = "Controlador/ControladorBorrarArchivo.php?id_archivo="+nuevo[1]+"&nuevo="+nuevo[0];
       var DeleteFile = new Request({
         method: "POST",
         url: URL,
         onRequest: function() {},
         onSuccess: function() {
           $("page_container").load.periodical(5000,this,
             "Controlador/ControladorBorrarArchivos.php");
         },
         onFailure: function(){alert("Error!");}
      }).send();
    });
  });


Escape the slash in the string.

url: 'Controlador\/ControladorBorrarArchivo.php? ...
                 ^that should work

Try assembling the url string before creating the request, then do something like

url: myUrl
0

精彩评论

暂无评论...
验证码 换一张
取 消