简体   繁体   English

将iframe内部,表单内部的一些输入发布为整个表单

[英]post some inputs that is inside an iframe,that is inside a form,as a whole form

Hi guys I have two questions, first, can I post inputs inside an iframe that is inside a form, as a part of the parent form? 嗨,大家好,我有两个问题,第一,我可以将输入发布到父表单的一部分的表单中吗?

second, I am rendering a google map with markers, based on a search, inside an iframe that ist loaded inside a form. 第二,基于搜索,我正在ist加载到表单内部的iframe中渲染带有标记的google map。

I need to get values of the markers, by drag n drop, out of the iframe, into the parent form. 我需要通过将n拖放到iframe之外的父窗体中来获取标记的值。 I could do this without drag n drop with jquery, but I want user friendly interface(I am already using jQuerys Draggable and Droppable). 我可以在不使用jquery进行拖放的情况下做到这一点,但是我想要用户友好的界面(我已经在使用jQuerys Draggable和Droppable)。 thanks in advance 提前致谢

what I did was, I just moved the inputs I needed filled, to my main window(parent) and used a function in the parent to handle generated data in the iframe using: 我所做的是,我只是将需要填充的输入移动到了主窗口(父窗口),并使用父窗口中的函数使用以下命令处理iframe中生成的数据:

window.parent.myfunction(data);

whenever I needed to pass data from scripts in iframe to parent window, I did the above. 每当我需要将数据从iframe中的脚本传递到父窗口时,我都会执行上述操作。

cheers 干杯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM