PDA

View Full Version : Call Application from a php script



fletchergirl
3 Jun 2014, 4:36 AM
Hi everybody!

I created an application with Sencha Architect. This app I want to call from a php-file. It works well but if you try to call it with a slow connection (what I can simmulate with NetLimiter), it get's a Hickup :-/ .
There are JavaScript errors:
http://www.sencha.com/forum/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAABUCAIAAADbMw16AAAST0lEQVR4nO2dy49UxRfHiwaj/AGSaMjPuAfjgpB4JbjhD0ASg3FFUCsuZKGu8BFphITYEC4JcRbYERYgOhoIYo3o9ISHOICDPTyaEZqOGqAbEjIhRmhkU7/FfdXj1L11+3b3dF/PJ71gqut1qk5961TdOwPhnN9DEATJBYQjCILkBVXRdpRKymdOuoUgCNIBkaJ5+rV33/6xYxNnzk6fOTs9dmxi7779qGsIggwLvqLtKJVGRvacZOO1L7/5feu2K/StC+vWn3/nvXPu7okjYyMje1DUEAQZfAgP5Oz82PgfH318r1SaeeZ/jRdemFm+fOrpp65t2DD9+puTo4dR1BAEGXx8RTvBxv/8ZEu70eCctzZv/mXhwlMLn7jy7rtNzm9evXqevlU5zFDR+gLjhBq/rLucEM5iite5E58BsaDuSrOQPOy96ke62exbP60aivXknkG8u7OL+w7c2rDhzt69Xur1t98+v27djfvte5xP79xZWrbs9Lbt3p0aUIdnnvehgpU0SCQOr3POWZTNT1ESSTAEcqJXpevIOQl361Fb3rfKEEuJde4QuJ82MKp1shuIQ+f3qEeK1gul61edrsMJ9b+KJs6+9fT9nCtF89wscuyUszkcitbbTZfsKJXGjk1cev+js08uurBsWatc/pfzew8fXr9569ajR9Xt2z+cN293oXB87WtjxyYARau7gjzJnVZVg0U5XYc7rvwVhX9U64eGiVHuUHWY1MRs48ho1GF/gWWHRW4RmZlxZ8ujovUvZ1jCnZP4glOHM1dYGv2cza4zd4p25uz0b2tfPff888fmzWOPPXbNdf/655/bDx5c3rXrA0LKhBwpFMafe+7M2WlbRYMdQlA0NYNZ0VT79WHyqtWzKYnmcfQ2xvghFhXNq8rb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t diese Aktion nicht.
ext-all-debug.js, Zeile 7366 Zeichen 9
SCRIPT5009: "myWin" ist undefiniert
konfigurator.php, Zeile 443 Zeichen 7

The line in ext-all-debug.js it has problems with is:
Ext.app.Application.instance = new App();


What do I do wrong?
Here's the JS-part of the php-file:


<head>
<title>Unbenannt</title>
<link rel="stylesheet" type="text/css" href="kontext/format/data/js/extjs4/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" id="rtc" href="data/css/app.css"/>
<script type="text/javascript" src="kontext/format/data/js/extjs4/ext-all-debug.js"></script>
<!--<script type="text/javascript" src="app/view/FormatWin.js"></script>!-->
<script type="text/javascript">
var oit_uebergabe = <? echo $_GET['oit_id'] ?>;
var pos_uebergabe = <? echo $_GET['pos'] ?>;
var frontrear_uebergabe = <? echo $_GET['frontrear'] ?>;
var oip_modul = '';
</script>
<script type="text/javascript" src="app.js"></script>

<script type="text/javascript">
function myLoad() {
myWin = Ext.create('Format.view.FormatWin',{});
}


setTimeout('myLoad()',1500);
</script>


Here's my app-code:



/*
* File: app.js
*
* This file was generated by Sencha Architect version 2.2.2.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.1.x library, under independent license.
* License of Sencha Architect does not include license for Ext JS 4.1.x. For more
* details see http://www.sencha.com/license or contact [email protected]
*
* This file will be auto-generated each and everytime you save your project.
*
* Do NOT hand edit this file.
*/

//@require @packageOverrides
Ext.Loader.setConfig({
enabled: true
});

Ext.application({

requires: [
'Format.view.FormatWin'
],
views: [
'FormatWin'
],
controllers: [
'FormatCtr'
],
name: 'Format',

launch: function() {
Format.g = {};

}

});


I'd really appreciate your help. Thanks!!

Gary Schlosberg
6 Jun 2014, 6:04 AM
So it all works if you use a normal network connection?