作者:手机用户2602904645 | 来源:互联网 | 2023-10-10 12:12
Iamcurrentlymovingsomeformfieldsonanexistingwebformintoamodalpopupwindowusingtheas
I am currently moving some form fields on an existing webform into a modal popup window using the asp.net toolkit extender. One of the fields uses the toolkit's toggle button extender on a checkbox a works quite well. When I move the checkbox and extender into the modal popup div, the toggle button extender stops working.
我目前正在使用asp.net工具包扩展程序将现有webform上的某些表单字段移动到模态弹出窗口中。其中一个字段在复选框上使用工具包的切换按钮扩展器非常有效。当我将复选框和扩展器移动到模态弹出窗口时,切换按钮扩展器停止工作。
After confirming the problem, I decided to try using a jquery plug-in called checkbox that provides the same function. Again this plugin worked as advertised until I moved it into the modal window div. I had hoped to avoid hand rolling a solution.
确认问题后,我决定尝试使用一个名为checkbox的jquery插件来提供相同的功能。再次,这个插件像广告一样工作,直到我将它移动到模态窗口div。我曾希望避免手动滚动解决方案。
I am guessing that the problem has something to to with css positioning. I would love to hear possible fixes before I build a solution from scratch.
我猜这个问题与css定位有关。在从头开始构建解决方案之前,我很想听听可能的修复。
Edit
编辑
Here is my original approach with toggle button extender:
这是我使用切换按钮扩展器的原始方法:
I have also now tried placing a hidden field and an image and writing jquery click function. This also results in the same issue (stops working inside modal div).I can get code to run by hard coding onclick event attribute. I would love to understand why and if there are any more elegant ways to work around this. I guess I could try a jquery modal popup plugin, but I didn't plan to rewrite this whole page.
我现在也尝试放置隐藏字段和图像并编写jquery点击功能。这也会导致同样的问题(停止在modal div中工作)。我可以通过硬编码onclick事件属性来运行代码。我很想知道为什么以及是否有更优雅的方法来解决这个问题。我想我可以尝试一个jquery模式弹出插件,但我不打算重写整个页面。
1 个解决方案