Forum
November 2nd, 2014
A
A
A
The forums are currently locked and only available for read only access
Topic RSS
Upload files, need help
07/06/2013
11:47
11:47
Svid
Russia
New Member
Members
Forum Posts: 1
Member Since:
07/06/2013
07/06/2013
Offline
Good day!
I've Grid, where is photos in columns. I need to add/edit record, had the opportunity to upload file.
I've code:
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
<script src="js/jquery.ui.datepicker.js" type="text/javascript"></script>
<script src="js/i18n/jquery.ui.datepicker-ru.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.src.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-ru.js" type="text/javascript"></script>
<script src="js/ajaxfileupload.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
<script src="js/jquery.ui.datepicker.js" type="text/javascript"></script>
<script src="js/i18n/jquery.ui.datepicker-ru.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.src.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-ru.js" type="text/javascript"></script>
<script src="js/ajaxfileupload.js" type="text/javascript"></script>
and Grid:
$('#table').jqGrid({It's don't work. I've errors:
url:'finish.php',
datatype: 'json',
mtype: 'POST',
colNames:['Ðазвание','Ðртикул','КоличеÑтво', 'Цена','БонуÑ','Дата поÑтуплениÑ','Фото'],
colModel :[
{name:'label', index:'label', width:200,search:true, editable:true,editoptions:{size:50},searchoptions:{sopt:['eq','lt','gt']}},
{name:'product_num', index:'product_num',search:true, width:50,align:'center', editable:false,searchoptions:{sopt:['eq','lt','gt']}},
{name:'quantity', index:'quantity',search:false, width:50,align:'center', editable:true,editoptions:{size:10}},
{name:'price', index:'price', width:50,align:'center', editable:true,editoptions:{size:10},searchoptions:{sopt:['eq','lt','gt']}},
{name:'bonus_asrt', index:'bonus_asrt',align:'center', width:50, editable:true,editoptions:{size:10},searchoptions:{sopt:['eq','lt','gt']}},
{name:'date_get', index:'date_get',align:'center',search:true, searchoptions:{sopt:['eq','lt','gt']},
stype:'text', searchoptions:{dataInit:function(element){ $(element).datepicker();}},
width:100, editable:true,formatter:"date",formatoptions:{srcformat:"d-m-y", newformat:"d-m-Y"},
editoptions:{size:10,dataInit: function(element){ $(element).datepicker();}}},
{name:'mainImg', index:'mainImg',align:'center',search:false, width:160,sortable:false, editable:true,edittype:'file'}],
width: 1000,
height: 700,
pager: $('#tablePager'),
rowNum:5,
rowList:[5,10,15,20,100],
sortname: 'label',
sortorder: 'asc',
caption: 'ÐÑÑортимент нашего магазина',
rownumbers: true,
rownumWidth: 40,
editurl:"finish.php",});
jQuery("#table").jqGrid('navGrid','#tablePager',
{edit:true,add:true,del:true,search:true,refresh:true},
{height:'auto',width: 'auto',reloadAfterSubmit:true,closeAfterEdit:true,
beforeSubmit:function(formid) {
$(formid).attr("method","POST");
$(formid).attr("action","");
$(formid).attr("enctype","multipart/form-data");
$.ajaxFileUpload({
url:'finish.php',
secureuri:false,
fileElementId:'mainImg',
dataType: 'json',});
}
},
{height:'auto',width: 'auto',reloadAfterSubmit:true,closeAfterAdd:true,
beforeSubmit:function(formid) {
$(formid).attr("method","POST");
$(formid).attr("action","");
$(formid).attr("enctype","multipart/form-data");
$.ajaxFileUpload({
url:'finish.php',
secureuri:false,
fileElementId:'mainImg',
dataType: 'json',});
}},
{reloadAfterSubmit:true,top:400,left:400},
{closeAfterSearch:true,top:400,left:400}
);
});
ret is undefined в jquery.jqGrid.src.js(line 7746)
and
jQuery.handleError is not a function в ajaxfileupload.js (line 116)
Very need help!
Sorry for my English
Forum Timezone: Europe/Sofia
Most Users Ever Online: 715
Currently Online:
26 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