i have a page with dynamic content on it i want it to work like whenever mouseover that dynamic data content the information about that content will show in a div
我有一个包含动态内容的页面我想让它像鼠标悬停那个动态数据内容一样工作,有关该内容的信息将显示在div中
i have done all the coding but have some bugs in it
我已完成所有编码但其中有一些错误
the code of dyanmic content where mouseover is working is
mouseover工作的dyanmic内容代码是
fgdfg
the preview of this code is live at
此代码的预览现场直播
fdgfd
Mouseover on ACC is working
ACC上的鼠标悬停正在运行
i want it to work on all STOCK SYMBOLS and the data in mouse over on ACC is not same what it should be
我希望它能够在所有STOCK SYMBOLS上工作,并且ACC上的鼠标数据与它应该是不一样的
1 个解决方案
#1
0
you request code has no param:
您请求代码没有参数:
**xmlhttp.open("GET","getinfo.php?q=&tpnt=",true);
xmlhttp.send();**
So it always sends empty request to your ajax data file : getinfo.php Also, check with console you will find you function showUser is undefined, as you never passed any param to it though you defined return on null param. so it never works.
所以它总是向你的ajax数据文件发送空请求:getinfo.php另外,用控制台检查你会发现你的函数showUser是未定义的,因为你从未传递任何参数,尽管你定义了返回null参数。所以它永远不会奏效。
**xmlhttp.open("GET","getinfo.php?q=<?php echo $sy;?>&tpnt=<?php echo $tpnt;?>",true);
xmlhttp.send();**
pass the q&tpnt param using JS, and store them in Rel in the span, that would make it work fine. php vars sy and tpnt will not work with ajax.
使用JS传递q&tpnt参数,并将它们存储在span中的Rel中,这将使其正常工作。 php vars sy和tpnt不能与ajax一起使用。
Please fix this up, and you will get it working.
请解决这个问题,你会得到它。
#1
0
you request code has no param:
您请求代码没有参数:
**xmlhttp.open("GET","getinfo.php?q=&tpnt=",true);
xmlhttp.send();**
So it always sends empty request to your ajax data file : getinfo.php Also, check with console you will find you function showUser is undefined, as you never passed any param to it though you defined return on null param. so it never works.
所以它总是向你的ajax数据文件发送空请求:getinfo.php另外,用控制台检查你会发现你的函数showUser是未定义的,因为你从未传递任何参数,尽管你定义了返回null参数。所以它永远不会奏效。
**xmlhttp.open("GET","getinfo.php?q=<?php echo $sy;?>&tpnt=<?php echo $tpnt;?>",true);
xmlhttp.send();**
pass the q&tpnt param using JS, and store them in Rel in the span, that would make it work fine. php vars sy and tpnt will not work with ajax.
使用JS传递q&tpnt参数,并将它们存储在span中的Rel中,这将使其正常工作。 php vars sy和tpnt不能与ajax一起使用。
Please fix this up, and you will get it working.
请解决这个问题,你会得到它。