dongleman4760 2011-11-09 07:35
浏览 40
已采纳

将数据从mysql获取到弹出窗口

I'm using php,html,javascript,mysql. My functionality goes like this. I have a division made in html which have the data retrieved from database as a list. So, if there are 5 list items each will be having an onclick event, clicking a popup window will be shown. Popup window is shown by javascript. So, i'm finished up to this part. The stage i'm stuck up is i have to get data into that popup window from my mysql tabe. How can i accomplish this, Guys, please help me out.

I also have a sample site whic looks exactly like my application. Please check it out.

http://yale.roammeo.com/main/#!/list/2011-11-09/12-30/

Popup is not showing any physically existing page. Its just showing a new html page with two divisions in it. How to retrieve data from mysql into this division?

<div id="blanket" style="display:none;"></div>
<div id="popUpDiv" style="display:none;width:500px;height:400px;">
<div align="left" class="popup_head">
<div align="right" style="float:right;width:10%">
<a href="#" onclick="popup('popUpDiv')" style="color:#FFFFFF;text-decoration:none">X</a>
</div>
<div style="clear:both"></div>
</div>
<div align="center" style="padding:10px;">

<form action=""  onSubmit='search()' method="post" name="frmSendMsg">
</form>
</div>
</div>
  • 写回答

1条回答 默认 最新

  • dongyaobo9081 2011-11-09 07:43
    关注

    Well, it depends on how exactly your javascript popup works.

    If the popup shows some physically existing page, then this page should fetch data from mysql just like your main page.

    If the popup shows some dynamically js-generated page, you should probably use AJAX techniques, i.e. have some PHP backend which is able to fetch data from mysql and address this backend from javascript. Most modern JS frameworks can do it any way you want (XML, JSON etc.).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 r语言神经网络自变量重要性分析
  • ¥15 基于双目测规则物体尺寸
  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢