将一个php变量传递给带有链接的jquery隐藏div [英] passing a php variable to a jquery hidden div with a link

查看:60
本文介绍了将一个php变量传递给带有链接的jquery隐藏div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这究竟是什么,这将是最好的PHP的JavaScript,但希望这是好的..这是我试图做的。我有一个链接,通过jquery运行一个隐藏的div 1.4.2是我正在运行...但我需要打开窗口并显示一个独特的变量取决于我点击的链接,但每次我尝试拥有它显示隐藏div中的变量它只显示1 ...而不是当前数字...任何想法?谢谢gt

i wasnt sure where exactly this would be best un javascript of php but hope this is ok.. here is what im trying to do. i have a link, that operates a hidden div via jquery 1.4.2 is what im running... but i need the window to open and show a unique variable depending on what link i clicked on, but every time i try to have it show the variable inside of the hidden div it only displays 1 ... and not the currect number... any ideas?thanks gt

推荐答案

好george粘贴你的代码你到目前为止写的一个简单的例子,我从你的帖子中了解到的是
well george paste your code that you have written so far , a quick example , what i understood from your post is here
展开 | 选择 | Wrap < span class =codeDivider> | 行号


我有一个foreach循环,从数据库中提取人们的评论并显示它们,评论旁边是一个链接,可以为该评论添加评论,父/子......当你点击链接时要将一个子项添加到父注释中,我有一个隐藏的div打开,但父项的id不会被推入注释框...


< a HREF ="" onclick =" return false" onmousedown =" javascript :toggleCom(\''ComB \'');"> Comm ent< / a>


该链接将打开盒子并允许我输入和解析,但就像我说它没有抓住那个父母身份...香港专业教育学院尝试过几种不同的方式我知道,但没有运气,谢谢

gt
i have a foreach loop thats pulling out peoples comments from the database and displaying them, and next to the comment is a link to be able to add a comment to that comment, parent/child... and when you click on the link to add a child to the parent comment, i have a hidden div that opens up, but the id to the parent isnt being pushed inside of the comment box...

<a href="" onclick="return false" onmousedown="javascript:toggleCom(\''ComB\'');">Comm ent</a>

that link will open the box up and allow me to type and parse, but like i said its not grabbing that parent id... ive tried a few different ways that i know, but no luck thanks
gt


无法帮助你,直到你出现代码伙伴,

你是否将正确的id传递给函数,用于添加注释,是所有id独特的divs去查看源代码并尝试搜索任何重复项。

问候,

omer aslam
cant help you out until you show up the code buddy,
are you passing the right id to the function, that use to adds comments, are all the ids of the divs unique go to view source and try searching any duplicates.
regards,
omer aslam


这篇关于将一个php变量传递给带有链接的jquery隐藏div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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