How to create more types jeditable?
How to create more types jeditable?
Is there any way to create various types for jeditable without having to create more columns?
for example:
[code]
$('.edit-textfield').editable('http://www.google.com/', {
'type': 'text'
});
$('.edit-date').editable('date.html', {
'type' : 'datepicker'
});
$('.edit-textarea').editable('http://www.google.com/', {
'type': 'textarea'
});
$('.edit-select').editable('http://www.google.com/', {
'data': "{'true': 'Ativo', 'false': 'Inativo'}",
'type': 'select'
});
[/code]
[code]
var oTable;
$(document).ready(function() {
/* Init DataTables */
oTable = $('#example').dataTable( {
"sDom" : 'T<"clear">lfrtip', //BOTOES
"bProcessing" : false, //MOSTRA O PROCESSO
"bServerSide" : true, //*IMPORTANTE USAR TABELA.PHP
'bPaginate' : true, //*IMPORTANTE PAGINA
for example:
[code]
$('.edit-textfield').editable('http://www.google.com/', {
'type': 'text'
});
$('.edit-date').editable('date.html', {
'type' : 'datepicker'
});
$('.edit-textarea').editable('http://www.google.com/', {
'type': 'textarea'
});
$('.edit-select').editable('http://www.google.com/', {
'data': "{'true': 'Ativo', 'false': 'Inativo'}",
'type': 'select'
});
[/code]
[code]
var oTable;
$(document).ready(function() {
/* Init DataTables */
oTable = $('#example').dataTable( {
"sDom" : 'T<"clear">lfrtip', //BOTOES
"bProcessing" : false, //MOSTRA O PROCESSO
"bServerSide" : true, //*IMPORTANTE USAR TABELA.PHP
'bPaginate' : true, //*IMPORTANTE PAGINA
This discussion has been closed.
Replies
[code]
<?php
include "../../../config.php";
if (isset($_POST['id'])) {
$id = mysql_real_escape_string($_POST['id']);
$value = utf8_decode($_POST['value']);
$name = utf8_decode($_POST['name']);
if ( $name == 'email' ) {
$sSET = "SET NEWS_EMAIL = '".$value."' ";
} elseif ( $name == 'status' ){
$sSET = "SET NEWS_STATUS = '".$value."' ";
}
$query = "UPDATE rec_news_usuarios $sSET WHERE NEWS_ID = '".$id."'";
mysql_query($query) or die(mysql_error());
print utf8_encode($value);
mysql_close();
}
?>
[/code]