Forum
November 2nd, 2014
A
A
A
Topic RSS
Offline
Offline
The forums are currently locked and only available for read only access


navGrid buttons redirecting
25/09/2009
10:03
10:03

viktor
Ushuaia, Tierra del Fuego
Member
Members
Forum Posts: 4
Member Since:
25/09/2009
25/09/2009

25/09/2009
10:25
10:25

viktor
Ushuaia, Tierra del Fuego
Member
Members
Forum Posts: 4
Member Since:
25/09/2009
25/09/2009

I try the following:
<script type="text/javascript">
jojo = function() {
alert('jojo');
}
$(document).ready(function()
{
$("#list1").jqGrid({
url:'{#ROOT_DIR#}/data/xml/filemanager-lista.php',
datatype: "xml",
colNames:['Desde','Archivo', 'Descripcion', 'Categorias', 'De', 'Para'],
colModel:[
{name:'Desde',index:'file_created', width:30},
{name:'Archivo',index:'file_title', width:100, editable:true, editoptions:{size:25}},
{name:'Descripcion',index:'file_desc', width:100},
{name:'Categorias',index:'', width:100},
{name:'De',index:'', width:40},
{name:'Para',index:'',width:40}
],
rowNum:10,
autowidth: true,
rowList:[10,20,30],
pager: jQuery('#pager1'),
sortname: 'file_created',
viewrecords: true,
sortorder: "desc",
height: "300px"
}).navGrid(
'#pager1',
{search:true}, // opciones
{height:280, reloadAfterSubmit:false, beforeShowForm:jojo}, // opciones edicion
{height:280, reloadAfterSubmit:false}, // opciones agregar
{reloadAfterSubmit:false}, // opciones eliminar
{searchtext:"Buscar..."} // opciones buscador
)
});
</script>
jojo = function() {
alert('jojo');
}
$(document).ready(function()
{
$("#list1").jqGrid({
url:'{#ROOT_DIR#}/data/xml/filemanager-lista.php',
datatype: "xml",
colNames:['Desde','Archivo', 'Descripcion', 'Categorias', 'De', 'Para'],
colModel:[
{name:'Desde',index:'file_created', width:30},
{name:'Archivo',index:'file_title', width:100, editable:true, editoptions:{size:25}},
{name:'Descripcion',index:'file_desc', width:100},
{name:'Categorias',index:'', width:100},
{name:'De',index:'', width:40},
{name:'Para',index:'',width:40}
],
rowNum:10,
autowidth: true,
rowList:[10,20,30],
pager: jQuery('#pager1'),
sortname: 'file_created',
viewrecords: true,
sortorder: "desc",
height: "300px"
}).navGrid(
'#pager1',
{search:true}, // opciones
{height:280, reloadAfterSubmit:false, beforeShowForm:jojo}, // opciones edicion
{height:280, reloadAfterSubmit:false}, // opciones agregar
{reloadAfterSubmit:false}, // opciones eliminar
{searchtext:"Buscar..."} // opciones buscador
)
});
</script>
Here, when you click on the "edit" button, it displays the "jojo" message alert.
Then I've tried:
<script type="text/javascript">
jojo = function(data) {
alert('jojo '+data);
}
$(document).ready(function()
{
$("#list1").jqGrid({
url:'{#ROOT_DIR#}/data/xml/filemanager-lista.php',
datatype: "xml",
colNames:['Desde','Archivo', 'Descripcion', 'Categorias', 'De', 'Para'],
colModel:[
{name:'Desde',index:'file_created', width:30},
{name:'Archivo',index:'file_title', width:100, editable:true, editoptions:{size:25}},
{name:'Descripcion',index:'file_desc', width:100},
{name:'Categorias',index:'', width:100},
{name:'De',index:'', width:40},
{name:'Para',index:'',width:40}
],
rowNum:10,
autowidth: true,
rowList:[10,20,30],
pager: jQuery('#pager1'),
sortname: 'file_created',
viewrecords: true,
sortorder: "desc",
height: "300px"
}).navGrid(
'#pager1',
{search:true}, // opciones
{height:280, reloadAfterSubmit:false, beforeShowForm:jojo(data)}, // opciones edicion
{height:280, reloadAfterSubmit:false}, // opciones agregar
{reloadAfterSubmit:false}, // opciones eliminar
{searchtext:"Buscar..."} // opciones buscador
)
});
</script>
jojo = function(data) {
alert('jojo '+data);
}
$(document).ready(function()
{
$("#list1").jqGrid({
url:'{#ROOT_DIR#}/data/xml/filemanager-lista.php',
datatype: "xml",
colNames:['Desde','Archivo', 'Descripcion', 'Categorias', 'De', 'Para'],
colModel:[
{name:'Desde',index:'file_created', width:30},
{name:'Archivo',index:'file_title', width:100, editable:true, editoptions:{size:25}},
{name:'Descripcion',index:'file_desc', width:100},
{name:'Categorias',index:'', width:100},
{name:'De',index:'', width:40},
{name:'Para',index:'',width:40}
],
rowNum:10,
autowidth: true,
rowList:[10,20,30],
pager: jQuery('#pager1'),
sortname: 'file_created',
viewrecords: true,
sortorder: "desc",
height: "300px"
}).navGrid(
'#pager1',
{search:true}, // opciones
{height:280, reloadAfterSubmit:false, beforeShowForm:jojo(data)}, // opciones edicion
{height:280, reloadAfterSubmit:false}, // opciones agregar
{reloadAfterSubmit:false}, // opciones eliminar
{searchtext:"Buscar..."} // opciones buscador
)
});
</script>
... and... the message alert shows up before the grid.
Solutions?!!!! Thanksss!!
Forum Timezone: Europe/Sofia
Most Users Ever Online: 715
Currently Online:
94 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66