如何让突出显示的行从数据库表中打开url [英] How to let a highlighted row open the url from a database table

查看:60
本文介绍了如何让突出显示的行从数据库表中打开url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是全新的javascript,这是我的情况:


我有一个php文件返回一个quered数据库表,我使用从网上下载javescript来高举表格的行。我回应了脚本和< table>标签我添加了[PHP] echo"< script type = \" text / javascript \" src = \" /modules/event/lib/tableH.js\">< / script>" ;;

echo"< table id = \" listing\"宽度= \" 100%\" CELLPADDING = \" 2\" CELLSPACING = \" 0\"类= \" calendar\" onMouseOver = \" javascript :trackTableHighlight(event,''#daFAFA''); \"

onMouseOut = \" javascript :highlightTableRow(0); \">" ;; [/ PHP]到目前为止,这对我来说还不错。


我的表中有一个字段可以将用户发送到另一个页面。我想要做的是当用户点击突出显示的行时,使用该字段的网址并将用户发送到该页面。


我知道这不应该是困难但是我不知道从哪里开始或查找。请问有谁请指导我完成这个任务。


提前致谢


Osward

解决方案

发布表行的示例,包括包含URL的字段。





以下是代码我的表[PHP] echo"< script type = \" text / javascript \" src = \" /modules/event/lib/tableH.js\">< / script>" ;;


bgcolor ="

Hello everyone,

I am totally new to javascript, here is my situation:

I had a php document that returns a quered database table and I use a javescript download from the web to highlighed the row of the table. I echoed the script and in the <table> tag I added [PHP]echo "<script type=\"text/javascript\" src=\"/modules/event/lib/tableH.js\"></script>";
echo "<table id=\"listing\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" class=\"calendar\" onMouseOver=\"javascript:trackTableHighlight(event , ''#daFAFA'');\"
onMouseOut=\"javascript:highlightTableRow(0);\">";[/PHP]That is fine for me so far.

I had a field in my table that send user to another page. What I want to do is when user click on the highlighted row, using that field''s url and sends user to that page.

I know that shouldn''t be difficult but I have no idea where to start or lookup. Would anyone please set me a direction to accomplish this.

Thanks in advance

Osward

解决方案

Post an example of a table row including the field which contains the URL.


Hi,

Following is the code of my table[PHP]echo "<script type=\"text/javascript\" src=\"/modules/event/lib/tableH.js\"></script>";


bgcolor = "


这篇关于如何让突出显示的行从数据库表中打开url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆