当我在隐藏的标签中插入图表时,如第二,第三等,我有这个错误.这里是错误:
Invalid dimensions for plot, width = 0, height = 400 in js/jquery.flot.min.js:6.
Run Code Online (Sandbox Code Playgroud)
我使用了bootstrap 2和jquery:
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
这是图书馆:
<script src="js/jquery.flot.min.js"></script>
<script src="js/jquery.flot.pie.min.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
和css:
#plotarea
{
max-width: none;
height: 400px;
}
#pie
{
max-width: none;
height: 400px;
}
#barmonth
{
max-width: none;
height: 400px;
}
#baryear
{
max-width: none;
height: 400px;
}
Run Code Online (Sandbox Code Playgroud)
带有每个图表id的div(总是将id更改为我需要显示的图表,如plotarea,pie,barmonth,baryear等):
<div id="plotarea"></div>
Run Code Online (Sandbox Code Playgroud)
我添加这种样式来修复宽度错误.ui-tabs .ui-tabs-hide { left: -10000px; visibility: hidden !important; }
,但即使这样,图表也不会在那些隐藏标签内绘制图表,只绘制第一个视图中的第一个标签...如果有一个表单,你现在可以吗?修理它?
我使用魅力模板.
最好的祝福!
我正在使用canvas,现在我可以保存到DB中,我可以将背景图像更改为我选择的图像列表.
我的问题是当我试图用背景保存画布时,保存的图像只显示我的画面而不是图像背景...有人可以帮我这个吗?
最好的祝福!
这里的代码:
<script src="js/drawingboard.min.js"></script>
<script data-example="1">
var defaultBoard = new DrawingBoard.Board("default-board", {
background: "#ffff",
droppable: true,
webStorage: false,
enlargeYourContainer: true,
addToBoard: true,
stretchImg: false
});
defaultBoard.addControl("Download");
$(".drawing-form").on("submit", function(e) {
var img = defaultBoard.getImg();
var imgInput = (defaultBoard.blankCanvas == img) ? "" : img;
$(this).find("input[name=image]").val( imgInput );
defaultBoard.clearWebStorage();
});
$(function() {
$("#file-input").change(function(e) {
var file = e.target.files[0],
imageType = /image.*/;
if (!file.type.match(imageType))
return;
var reader = new FileReader();
reader.onload = fileOnload;
reader.readAsDataURL(file);
});
function fileOnload(e) {
var $img = …
Run Code Online (Sandbox Code Playgroud) 也许你可以帮我解决这部分代码问题.我试图让它工作,但当我试图UPDATE
总是告诉我这个错误:
警告:PDOStatement :: execute()[pdostatement.execute]:SQLSTATE [HY093]:参数号无效:绑定变量数与/ home/-----/public_html/soft/Admin/configuracion中的标记数不匹配.php在264行
第264行是:
// Execute the query
$stmt->execute();
Run Code Online (Sandbox Code Playgroud)
下面是:
$stmt->bindParam(':page_meta_tag', $_POST['page_meta_tag']);
$stmt->bindParam(':id', $_POST['id']);
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
<?php
include '../include/update_config.php';
$conn = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass);
$action = isset( $_POST['action'] ) ? $_POST['action'] : "";
if($action == "update"){
try{
$query = "update CONFIGURACION set id = :id, nombre_clinica = :nombre_clinica, direccion = :direccion, telefono_clinica = :telefono_clinica, titulo_clinica = :titulo_clinica, logo = :logo, page_meta_tag = page_meta_tag where id = 1";
$stmt = $conn->prepare($query);
$stmt->bindParam(':nombre_clinica', $_POST['nombre_clinica']);
$stmt->bindParam(':direccion', $_POST['direccion']);
$stmt->bindParam(':telefono_clinica', $_POST['telefono_clinica']);
$stmt->bindParam(':titulo_clinica', …
Run Code Online (Sandbox Code Playgroud)