【发布时间】:2015-08-10 18:44:38
【问题描述】:
嗨 :) 我需要一些帮助。我有一个关于如何显示我的模式的问题,只需单击表格内的“查看位置”按钮。一旦我点击它,模态就会显示,但我不能这样做。这是我的代码:
echo "<td><a href='');\">View Location</a></td>";
echo "<td><a href='editPeople.php?id=".$query2['ID']."');\">Edit</a></td>";
echo "<td><a href='deletePeople.php?id=".$query2['ID']."' onClick=\"javascript:return confirm('Are you sure you want to delete this record?');\">Delete</a></td><tr>";
这是我的 js 来自免费来源:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function ic() {
$("#btnShow").click(function ic() {
$("#dialog").dialog({
modal: true,
title: "Google Map",
width: 600,
hright: 450,
buttons: {
Close: function ic() {
$(this).dialog('close');
}
},
open: function ic() {
var mapOptions = {
center: new google.maps.LatLng(14.8527393, 120.8160376),
zoom: 18,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map($("#dvMap")[0], mapOptions);
}
});
});
});
</script>
我的问题在于这部分 echo "View Location"; 我不知道让它发挥作用。这里有人知道如何解决这个问题吗?感谢您的帮助!
【问题讨论】:
-
您是否使用 PHP 创建表?看起来是的。如果您知道,那么我需要更正 PHP 代码,否则需要将其删除...
-
@YPS 是的,我正在使用 PHP 创建表格。
标签: javascript hyperlink tags anchor