弹出窗口的确切功能是什么?

时间:2013-07-11 06:08:55

标签: javascript html popup window

这是POPUP Box的代码:

<?php
$getBtsid = $_REQUEST['uid'];
$btsid = substr($getBtsid, 0, -1);
?>

<center>

<?php
conFunc($db); // Connection Function

$congestedsite = mysql_query("SELECT * FROM `rollout_tracker` WHERE `site_id` LIKE '%".$btsid."'");
while($rows = mysql_fetch_array($congestedsite))
{
    echo "<b>BTS ID:</b> " . $btsid . "<br />";
    echo "<b>Sector ID:</b> " . substr($getBtsid, -1) . "<br />";
}
echo "<br /><br /><br />";
echo '<a href="javascript:window.close();">CLOSE WINDOW</a>';  
?>

这就是这个POPUP BOX的调用方式:

echo "<a href=javascript:popcontact('btsdetails.php?uid=" . $row["bs_id"] . "')>" . $row['bs_id'] . "</a>"; 

我的JavaScript功能在下面:

function popcontact(URL)
{
    var popup_width = 600;
    var popup_height = 400;
    var day = new Date();
    var id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+popup_width+',height='+popup_height+'');");
}

虽然此代码正常运行,但它以某种方式影响我的其他JavaScript代码。

我不明白原因。可能,我在这个代码中遗漏了一些东西。

有人可以帮我解决这个问题吗?请?

1 个答案:

答案 0 :(得分:0)

为我工作

function OpenCustomerInfo(OrderID) {
    CustomerInfoWin = window.open('customer_details.asp?orderid=' + OrderID, 
    'CustomerInfoWin',
    'width=600, 
     height=300, 
     left=200, 
     top=200, 
     resizable=yes,
     scrollbars=no,
     menubar=yes')

    CustomerInfoWin.focus();
 }
相关问题