开发者

How to submit an iframe form and close jquery lights out in a single mouseclick

The web app i'm creating uses jquery lights out and has an html iframe to an internal form. Whoever uses this app will have to press the submit button. Is there a way i can link a free area of space surrounding the submit button, so any clicks within that space call the jque开发者_运维技巧ry functions in my code?

I'd like to do this so submitting the form automatically closes the lights out messagebox, rather than app users seeing what happens in the iframe after they submit the form.

Thanks! -Diego


My suggestion is to put an iframe of a page from your own site on the iframed form page. Via url parameters you can submit data to the parent window because this second iframe is on the same domain.

Here is a really bad diagram of how the concept works.

```````````````````````````
|  parent window     <-data <<<<
|                                ^
| |====x-domain security====|    ^
| |  Your form page iframe  |    ^
| |  [submit]               |    ^
| |                         |    ^
| |  |````````````````````  |    ^
| |  |helper iframe  data->>>>>>  

Of course this means you would need access to the html of the external site.

See the top answer on this question for details. Resizing an iframe based on content

It sounds like the same problem except you are manipulating jquery lights out instead of the height.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜