您好我在我的代码中使用了小盒子,我在我的网站上使用它进行卖家注册。我在我的代码中尝试过它,但它没有发生。我已经复制了Tiny Box Javascript模板窗口的演示索引页面中的代码,我已将注册页面的链接更改为向我显示结果。我已将js文件导入到我的代码中,如下所示
<script type="text/javascript" src="tinybox.js"></script>
然后我有列表项打开
点击的窗口<button onclick="TINY.box.show({iframe:'addshop.php',boxid:'frameless',width:750,height:450,fixed:false,maskid:'bluemask',maskopacity:40,closejs:function(){closeJS()}})">Add Shop </button>
但它不执行任何操作这是我的整个home.php代码
<?php
session_start();
if($_SESSION['name'])
{?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/lightgrid.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/experiment-styles.css">
<link href="css/styles.css" rel="stylesheet" type="text/css">
<link href="sprites.css" rel="stylesheet" type="text/css">
<link href="css/calender1.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Dashboard | Local Shop Mall</title>
<script>
function myfunction() {
window.print();
}
<script type="text/javascript" src="tinybox.js">
function openJS(){alert('loaded')}
function closeJS(){alert('closed')}
</script>
</head>
<body>
<div id='cssmenu'>
<ul>
<li class='active has-sub'><a href='home.php'><span>Masters</span></a>
<ul>
<li><a href='pending_orders.php'><span>Pending Orders</span></a></li>
<li class='last'><a href='manage_seller.php'><span>Manage Sellers</span></a></li>
<li><a href='report.php'><span>Reports</span></a></li>
<li><a href='dashboard.php'><span>Dashboard</span></a></li>
</ul>
</li>
<script>
function myfunction()
{
onclick="TINY.box.show({iframe:'addshop.php',boxid:'frameless',width:750,height:450,fixed:false,maskid:'bluemask',maskopacity:40,closejs:function(){closeJS()}})"
<button onclick="TINY.box.show({iframe:'addshop.php',boxid:'frameless',width:750,height:450,fixed:false,maskid:'bluemask',maskopacity:40,closejs:function(){closeJS()}})">Add Shop </button>
<li class='has-sub'><a href='#'><span>Settings</span></a>
<ul>
<li><a href='changepassword.php'><span>Change password</span></a></li>
</ul> <li class='has-sub'><a href='logout.php'><span>Log-Out</span></a>
</ul><br>
<font color="#FFFFFF" style='margin-left:850px;'>Welcome Administrator</font>
</div>
<div>
<?php include("connection.php");
?>
<br>
<a id="topseller" style='margin-left:39%;'><font size="5px"><i>List Of Top 5 Sellers<br><i></font></a>
<table align="center" style='border:1px solid;width:80%; margin-left:130px;border-color:white'><br>
<tr><th class="th1">Shop No</th><th class="th1">Shop Name</th><th class="th1">Owner Name</th><th class="th1">Contact Number</th><th class="th1">Email Id</th></tr>
<?php
$tquery=mysql_query("select * from seller_registration where status='yes' order by amount desc limit 5");
while($row=mysql_fetch_array($tquery)) { ?>
<tr border="1"><td align="center" class="td1" style='border:1px solid; width:10%; margin-left:130px;border-color:white'><?php echo $row['id']; ?></td>
<td align="center" class="td1" style='border:1px solid; margin-left:130px;border-color:white'><?php echo $row['shopname']; ?></td>
<td align="center" class="td1" style='border:1px solid; margin-left:130px;border-color:white'><?php echo $row['name']; ?></td>
<td align="center" class="td1" style='border:1px solid; margin-left:130px;border-color:white'><?php echo $row['mobile']; ?></td>
<td align="center" class="td1" style='border:1px solid; margin-left:130px;border-color:white'><?php echo $row['email']; ?></td></tr>
<?php }
?>
</table>
<br/><br/>
<a id="topproduct" style='margin-left:39%;'><font size="5px"><i>List Of Top 5 Products<i></font></a>
<table align="center" style='border:1px solid;width:80%; margin-left:130px;border-color:white'><br>
<tr><br><th class="th1">Shop No</th><th class="th1">Product Name</th><th class="th1">Shop Name</th><th class="th1">Owner Name</th></tr>
<?php
$tquery=mysql_query("SELECT order_detail.pid,order_detail.oid,COUNT(order_detail.pid) AS p, seller_product.id,seller_product.productname,seller_product.shopno,seller_registration.id,seller_registration.name,seller_registration.shopname FROM order_detail INNER JOIN seller_product ON order_detail.pid = seller_product.id INNER JOIN seller_registration ON seller_product.shopno = seller_registration.id GROUP BY order_detail.pid ORDER BY p DESC limit 5");
while($row1=mysql_fetch_array($tquery)) { ?>
<tr>
<td align="center" class="td1" style='border:1px solid; width:10%; margin-left:130px;border-color:white'><?php echo $row1['shopno']; ?></td>
<td align="center" class="td1" style='border:1px solid; width:35%; margin-left:130px;border-color:white'><?php echo $row1['productname']; ?></td>
<td align="center" class="td1" style='border:1px solid; margin-left:130px;border-color:white'><?php echo $row1['shopname']; ?></td>
<td align="center" class="td1" style='border:1px solid; margin-left:130px;border-color:white'><?php echo $row1['name']; ?></td>
</tr>
<?php }
?>
</table>
<br/><br/>
<style>
.th1
{
width:180px;
color:white;
font-size:1.2em;
}
.td1
{
width:180px;
color:white;
font-size:1.1em;
}
</style>
<center><button onclick="javascript:window.location.href='dashboardprint.php';" style='background-color: #7D7D7D;color: #FFFFFF;font-size: 20px;height: 30px;width:97px;'>Print</button></div></center>
</div>
</body>
</html>
<?php
}
else
{
echo "<script> alert('Login Expired Please Login Again'); </script>";
echo "<script> window.location='index.php'; </script>";
}