Depending on how you're showing the Thickbox popup, there are going to be different ways to accomplish what you want.
If you're using an IFRAME popup, there is no way (that I know of) to pass the value back to the parent.
If you're using inline content (what I would suggest for this purpose), the value will still be available to you after Thickbox hides the inline content. You can then use jQuery to access the fields that the user filled in.
发布评论
评论(2)
您可以从 iframe 厚盒中将数据发送回父级:
在父级上,您可以编写一个函数来处理此数据:
然后只需使用父级从 iframe 页面在提交函数(或任何位置)中调用此函数即可:
You can send data back to the parent from within an iframe thickbox:
On your parent, you can write a function to handle this data:
Then simply call this function in your submit function (or where ever) from the iframe page using parent:
根据您显示 Thickbox 弹出窗口的方式,将有不同的方法来完成您想要的任务。
如果您使用 IFRAME 弹出窗口,则无法(据我所知)将值传递回父级。
如果您正在使用内联内容(我为此建议的建议),则在 Thickbox 隐藏内联内容后,该值仍然可供您使用。 然后,您可以使用 jQuery 访问用户填写的字段。
Depending on how you're showing the Thickbox popup, there are going to be different ways to accomplish what you want.
If you're using an IFRAME popup, there is no way (that I know of) to pass the value back to the parent.
If you're using inline content (what I would suggest for this purpose), the value will still be available to you after Thickbox hides the inline content. You can then use jQuery to access the fields that the user filled in.