Ignore:
Timestamp:
2010-11-16T17:12:05+13:00 (13 years ago)
Author:
sjb48
Message:

Working on saving the format statement. Currently have a button that calls the system action and returns some html. Working on system.xsl but need to get the format string from String to XML. I have found out that HTML is not necessarily valid XML.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js

    r23312 r23333  
    77{
    88
    9     var formatStatement = document.getElementById('formatStatement');
    10     console.log(formatStatement);
    11     if(formatStatement.hasChildNodes())
    12     {
    13         var formatstring = traverse(formatStatement, "");
    14         console.log(formatstring);
     9    var formatStatement = document.getElementById('formatStatement').innerHTML;
     10    //console.log(formatStatement);
     11
     12    //var myurl = 'http://localhost:8080/greenstone3/format?a=s&sa=s&t='+formatStatement;
     13
     14    //jQuery.post( url, [ data ], [ success(data, textStatus, XMLHttpRequest) ], [ dataType ] )
     15
     16    $.post("http://localhost:8080/greenstone3/format?a=s&sa=s", {data: formatStatement}, function(data) {
     17        $('.result').innerHTML = data; //html(data);
     18        console.log("Success, we have received data");
     19        console.log(data);
     20        }, 'html');
     21
     22/*
     23    $.ajax({
     24        type: "POST",
     25        url: "http://localhost:8080/greenstone3/format?a=s&sa=s",
     26        data: formatStatement,
     27        processData: false,
     28        success: function(data) {
     29            //$('.result').html(data);
     30            console.log("Success, we have received data");
     31            //console.log(data);
     32        }
     33     });
     34*/
     35    /*
     36    $.ajax({
     37        url: myurl,
     38        success: function(data) {
     39            //$('.result').html(data);
     40            console.log("Success, we have received data");
     41            console.log(data);
     42        }
     43    });
     44    */
     45    //if(formatStatement.hasChildNodes())
     46    //{
     47        //var formatstring = traverse(formatStatement, "");
     48        //console.log(formatstring);
    1549
    1650        // var children = $(formatStatement).children('div');
     
    3569        }
    3670        */
    37     }
     71    //}
    3872}
    3973
Note: See TracChangeset for help on using the changeset viewer.