[eluser]Bernat Bonet[/eluser]
I've my first view like this:
Code:
<html>
<head>
<title><?php echo $this->lang->line('login_titulo'); ?></title>
<link rel="stylesheet" type="text/css" href="/lib/extjs3.0/resources/css/ext-all.css" />
<sc src="/lib/extjs3.0/adapter/ext/ext-base.js" type="text/javascript"></sc>
<sc src="/lib/extjs3.0/ext-all.js" type="text/javascript"></sc>
<sc src="/lib/extjs3.0/src/locale/ext-lang-<?= $this->config->item('language');?>.js" type="text/javascript"></sc>
<sc src="login/login.js" type="text/javascript"></sc>
<sc src="login/login_base.js" type="text/javascript"></sc>
</head>
<body>
</body>
</html>
Where I put sc it means script because when I preview code, system removes it.
Where login/login.php is a js file accessing codeigniter variables and login/login_base.js a simple js file. Those files are in a login folder inside views.
I dont't know where to place login.php, because I want to use codeigniter language variables.
For the other file, if I place at root folder, I can acces and it executed fine.
My problem is how and where to place first one for using codeigniter variables.
Login.php code:
Code:
var login_form = new Ext.form.FormPanel({
labelWidth : 150,
url : 'login/validar',
frame : true,
title : '',
width : 230,
padding : 20,
defaultType : 'textfield',
monitorValid : true,
buttonAlign : 'center',
items : [{
fieldLabel : '<?=$this->lang->line("login_login_form_field_usename");?>',
name : 'username',
allowBlank : false
}
I don't know if I explain it cleary.
Thanks a lot