/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to svg Converter/svgconverter.js

  • Committer: a11vikob
  • Date: 2013-04-03 10:37:25 UTC
  • mto: (9.2.1 lenasys)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: a11vikob@student.his.se-20130403103725-54hdupq68scrd1nl
Changed directory structure of SVG-converter.
Also fixed some operator errors in svgtocanvas.php

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
                var AJAXServiceRunning=false;
7
7
                var AJAXReturnfunction;
8
8
                var httpAjax = false;
9
 
                function getSVG(fileName){
10
 
                                paramstr="svgname="+escape(fileName);
11
 
                                AjaxService("SVG_TO_CANVAS_III.php",paramstr,"returnedSVG");
 
9
                function getSVG(fileName) {
 
10
                        paramstr="svgname="+escape(fileName);
 
11
                        AjaxService("svgtocanvas.php",paramstr,"returnedSVG");
12
12
                }
13
13
                
14
14
                /*--------------------------------------------------------------------------------
42
42
                                Each service uses a different url and a different parameter layout.
43
43
                                                                
44
44
                ----------------------------------------------------------------------------------*/
45
 
                function AjaxServiceExec( servicename, serviceparam ) {
 
45
                function AjaxServiceExec(servicename, serviceparam) {
46
46
                // Parameters are set, initiate AJAX engine
47
47
                        if( window.XMLHttpRequest ) {
48
48
                                httpAjax = new XMLHttpRequest();
65
65
                        try{
66
66
                                httpAjax.onreadystatechange = getPage;
67
67
                    } 
68
 
                        catch(e){
 
68
                        catch(e) {
69
69
                                alert( "onreadystatechange didn�t go well!" );
70
70
                                return false;
71
71
                        } 
73
73
                                httpAjax.open( 'POST', servicename, true );
74
74
                                httpAjax.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded;" );
75
75
                    } 
76
 
                        catch(e){
 
76
                        catch(e) {
77
77
                                alert( "Couldn�t open url." );
78
78
                                return false;
79
79
                    } 
80
80
                        try{
81
81
                                httpAjax.send( serviceparam );                          
82
82
                    } 
83
 
                        catch(e){
 
83
                        catch(e) {
84
84
                                alert( "Couldn�t send request." );
85
85
                                return false;
86
86
                        }
96
96
                ----------------------------------------------------------------------------------*/
97
97
 
98
98
        function getPage() {                            
99
 
                if(httpAjax.readyState == 4){
 
99
                if(httpAjax.readyState == 4) {
100
100
                        tr = httpAjax.responseText;
101
 
                        eval( AJAXReturnfunction + '(str);' );
 
101
                        eval( AJAXReturnfunction + '(tr);' );
102
102
                                if( AJAXQueue.length > 0 ) {
103
103
                                        AJAXReturnfunction = AJAXQueue.pop();
104
104
                                        var Aparam = AJAXQueue.pop();