Re: Javascript xmlhttprequest send error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found a _javascript_ forum.  I regret to say that though they gave it their best effort, they were unable to help me find my problem.  So here is what I'm going to do.  Just in case someone is investigating this message, I will share the solution I finally found.  

In my XHTML code I forgot to include the XML SVG namespace.  This was most of my error.  The rest of my error came from excessive } symbols.  I had to completely disassemble my code and reassemble it piece by piece just to find the error.  It took me several days to accomplish this task.  Apparently XHTML and _javascript_ are very picky when it comes to coding them.  In a future video I will demonstrate all of these problems on YouTube.  

On Wed, Jul 3, 2024 at 9:43 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:


On Wed, Jul 3, 2024 at 7:49 PM Ted Hickox <megelinic@xxxxxxxxx> wrote:
And a hearty good evening everyone.  Here is my _javascript_ code.

var SVG_Data;
var Retrieved_Data;
var Attribute_List;
var Coordinate_List;
var Counter;
function Setup() {
     SVG_Data = new XMLHttpRequest();
     SVG_Data.open("GET","http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.xq", true);
     SVG_Data._onreadystatechange_ = function () {
         if (SVG_Data.readyState == 4) {
            Retrieved_Data = SVG_Data.responseText;
            Retrieved_Data = Retrieved_Data.split("*");
            Attribute_List = "";
            Coordinate_List = "";
            for (Counter = 0; Counter < 8; Counter++) {
      Attribute_List = Attribute_List + Retrieved_Data[Counter] + "*";
  Counter = Counter + 1;
  Coordinate_List = Coordinate_List + Retrieved_Data[Counter] + "*";}
  Attribute_List = Attribute_List.split("*");
      Coordinate_List = Coordinate_List.split("*");
      Coordinate = "<ellipse id = 'My_Ellipse'";
    for (Counter = 0; Counter < 4; Counter++) {
         Coordinate = Coordinate + " " + Attribute_List[Counter] + " = '" + Coordinate_List[Counter] + "'";}
    Coordinate = Coordinate + ">";
     document.getElementById("Image_Box").innerHTML = Coordinate;
         }
     };

           SVG_Data.send();}

When I run this code, I get the following error:  

uncaught typeerror.  cannot read properties of undefined reading send.

I know this has to do with SVG_Data.send().  But I don't know what I've done wrong.  Can anyone here assist me with this problem?




You should ask a _javascript_ mailing list / support forum instead. 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux