- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在弹出窗口中使用 javascript 和 php。计划是将父页面上的行 ID 传递给弹出窗口。
这段代码运行良好:
<a href="#" onclick="PopupCenter('example.php', 'myPop1',500,400); " class="add"><img src='images/buttons/edit.png' title='Edit Content'></a>
出现弹出窗口。但是当我尝试添加 ?textID=<?$row['textID']?>
,这是我用来传递行 ID 的代码,结果如下:
<a href="#" onclick="PopupCenter('example.php?textID=<?$row['textID']?>', 'myPop1',500,400); " class="add"><img src='images/buttons/edit.png' title='Edit Content'></a>
弹出窗口不起作用。它似乎只是刷新页面。谢谢你的帮助。
这是我的完整代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
include("global.php");
?>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>About | ILAM</title>
<!-- main css -->
<link href="style.css" rel="stylesheet" type="text/css">
<link href="styleAdmin.css" rel="stylesheet" type="text/css">
<script type= "text/javascript">
<!-- showHideDiv -->
function divHideShow(divToHideOrShow){
var div = document.getElementById(divToHideOrShow);
if (div.style.display == "block"){
div.style.display = "none";}
else{
div.style.display = "block";}
}
<!-- popUp -->
function PopupCenter(pageURL, title,w,h)
{
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
</script>
</head>
<!-- Body -->
<body>
<div id="pagewrap">
<!-- Header -->
<div id="header">
<div class="floating-menu">
<div class="logo"><img src="images/static/ilamLogo.png"></div>
<div class="translator">
</div>
<ul>
<li><a href="join.php">Join Us!</a></li>
<li><div class="indent"> </div></li>
<li><a href="contact.php">Contact</a></li>
<li><a href="career.php">Career</a></li>
<li><a href="gallery.php">Gallery</a></li>
<li><a href="facilities.php">Facilities</a></li>
<li><a href="courses.php">Courses</a></li>
<li><a href="#" class="active">About</a></li>
<li><a href="index.php">Home</a></li>
<li><a href="javascript:divHideShow('menuContentBanner');divHideShow('menuContentBannerText');divHideShow('menuOpenPost');divHideShow('menuMainPost');divHideShow('menuFooterLeft');divHideShow('menuFooterMiddle');divHideShow('menuFooterRight');">Admin</a></li>
</ul>
</div>
</div>
<!-- //Header -->
<!-- ContentBanner -->
<div id="contentBanner">
<div id="menuContentBanner" class="menuBarStyle">
<div class="addEditDelete">
<ul>
<li><a href="addImage.php"><img src="images/buttons/edit.png" title="Edit Image"></a></li>
</ul>
</div>
</div>
<img src="images/headers/aboutHeader.jpg"></div> <!--BannerImage -->
<div class="textLeft">
<div id="menuContentBannerText" class="menuBarStyle">
<div class="addEditDelete">
<ul>
<li><a href="#" onclick="PopupCenter('edit_article.php', 'myPop1',500,400); " class="add"><img src="images/buttons/edit.png" title="Edit Content"></a></li>
</ul>
</div>
</div>
<h3>As an Academic Institution.</h3><p> ILAM takes to heart its responsibilities, not only to its students, but also to its team, and community</p></div> <!-- BannerText -->
<!-- //ContentBanner -->
<!-- Content: Blue -->
<div id="content">
<!-- SidePost -->
<aside id="sidebar">
<section class="widget">
<ul>
<li><a href="#"><img src="images/buttons/factsbtn.png" onmouseover="this.src='images/buttons/factsbtnHover.png'" onmouseout="this.src='images/buttons/factsbtn.png'"></a></li>
<li><a href="#"><img src="images/buttons/testibtn.png" onmouseover="this.src='images/buttons/testibtnHover.png'" onmouseout="this.src='images/buttons/testibtn.png'"></a></li>
<li><a href="#"><img src="images/buttons/promosbtn.png" onmouseover="this.src='images/buttons/promosbtnHover.png'" onmouseout="this.src='images/buttons/promosbtn.png'"></a></li>
</ul>
</section>
</aside>
<!-- //SidePost -->
<!-- OpenerPost -->
<article class="openerPost">
<table>
<tr>
<div id="menuOpenPost" class="menuBarStyle">
<div class="addEditDelete">
<ul>
<li><a href="#" onclick="PopupCenter('example.php?promoID=<?=$row['promo_id']?>', 'myPop1',400,400); "><img src="images/buttons/edit.png" height="27" width="65"></a></li>
</ul>
</div>
</div>
</tr>
<tr>
<td><?php
$query="SELECT * from text_tb WHERE textID = '1'";
$result=mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
echo $row[1]; // the email value
?>
</td>
</tr>
</table>
</article>
</div>
<!-- //OpenerPost -->
<!-- Content: White -->
<div id="content">
<article class="mainPost">
<table>
<tr>
<div id="menuMainPost" class="menuBarStyle">
<div class="addEditDelete">
<ul>
<li><a href="addImage.php"><img src="images/buttons/edit.png" title="Edit Content"></a></li>
</ul>
</div>
</div>
</tr>
<tr><td class="title">Our Mission</td></tr>
<tr>
<td><p>As an academic institution, ILAM takes to heart its responsibilities, not only to its students,
but also to its team, and community. We know that in addition to reaching our vision for the school, ILAM has
a role and certain duties that it has to carry out.</p></td>
</tr>
<tr>
<td class="subtitle">For the Students.</td>
</tr>
<tr>
<td><p>International Language Academy Manila (I.L.A.M.) is a premier language school in Makati
City, Philippines whose mission is to provide quality education to professionals and
non-professionals aiming to be proficient in English. The school takes pride in its ESL/EFL
courses such as: Functional Grammar, Conversation, Business Writing, Business English,
Pronunciation, IELTS review, TOEIC review, etc. which are all taught in a multidisciplinary
setting to ensure comprehensive skill development in the four areas of communication (listening,
speaking, reading, and writing). Apart from teaching English, the school also intends to inculcate strong intercultural
awareness among its students by integrating outdoor activities in its curriculum. </p></td>
</tr>
<tr>
<td class="subtitle">For the Community.</td>
</tr>
<tr>
<td><p>As an academic institution, ILAM takes heart to its responsibilities in promoting education and tourism in the country, which is the reason behind its partnership with the Bureau of Immigration and various multinational companies for English training. It aims to show its foreign students how much the
country has improved, and that the Philippines is a place where they can always find another
home. ILAM goes beyond the technicalities of language. It offers students the opportunity to
foster a deeper understanding of various cultures and thus, enables them to appreciate more the
beauty of language as they get to communicate and interact with different people.</p></td>
</tr>
<tr>
<td class="subtitle">For its Team.</td>
</tr>
<tr>
<td><p>As an academic institution, ILAM takes heart to its responsibilities in promoting education
and tourism in the country, which is the reason behind its partnership with the Bureau of Immigration and various
multinational companies for English training. It aims to show its foreign students how much the
country has improved, and that the Philippines is a place where they can always find another
home. ILAM goes beyond the technicalities of language. It offers students the opportunity to
foster a deeper understanding of various cultures and thus, enables them to appreciate more the
beauty of language as they get to communicate and interact with different people.</p></td>
</tr>
</table>
</article>
</div>
<footer id="footer">
<table>
<tr>
<td>
<div id="menuFooterLeft" class="menuBarStyle">
<a href="addImage.php"><img src="images/buttons/edit.png" title="Edit Content"></a>
</div>
<h3>Let's Meet</h3>
<p>2/F Makati Creekside Mall Bldg. Amorsolo Cor. VA Rufino St. Legazpi Village, Makati City Philippines</p></td>
<td>
<div id="menuFooterMiddle" class="menuBarStyle">
<a href="addImage.php"><img src="images/buttons/edit.png" title="Edit Content"></a>
</div>
<h3>Let's Talk</h3>
<p>Telephone: 632-8400285 / 519 9502<br>Cellphone: 0917-5324332</p></td>
<td>
<div id="menuFooterRight" class="menuBarStyle">
<a href="addImage.php"><img src="images/buttons/edit.png" title="Edit Content"></a>
</div>
<h3>The Affiliates</h3>
<p>Accenture<br>
Asian Institute of Management<br>
ConveyThis<br>
The Little Web Directory<br></td>
</tr>
<tr>
<td class="copyright">Copyright © 2012 ILAM</td>
</tr>
</table>
</footer>
</div>
<!-- /#pagewrap -->
</body>
</html>
最佳答案
你需要像这样使用echo
:
<?php echo($row['textID']) ?>
关于php - 弹出窗口不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13938988/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!