开发者

How to dynamically generate information base on the iFrame content?

I have a iFrame, that allow people to post information to the web server directly, but before he post, he must login first....like this:

________________________
[______I inject --->_X_]
|                      |
|     iFrame           |
|        Login         |
|                      |
________________________

I can hide the frame by click the X button, but after the user logined, I would like to have something like this:

________________________
[____________________X_]
|                      |
|    Post Your         |
|        Msg           |
|    (iFrame)          |
|                      |
________________[POST]__

It just like some clipper in some note taking program, when the 开发者_开发问答user click the "post" button, the msg will be sent to server, also, the iFrame will be disappear. But I got a problems here....How can I paste the post button? It should in the iframe or client side, just like the X, I injected in the client side? If the post button is in the client side, I can add a hidden submit button in the Post Your msg iFrame form, when the user click it, I just make the user click the hidden submit button too. But the question is, when the user havn't sign in, I just have the Login, within a post button. But I can't detect what's going on inside the iFrame. How can I implement this post button? Thank you .


I think what you want to do is create a div, position it in the center of the screen and give it a higher z-index so the box looks like it's floating. So we have a central floating box, inside the box you need 2 more boxes 1st being another div box (that will contain the X) and the second being the Iframe. For both do position:relative; float:left use matching widths and declare heights. From her you have your iframe & close button in separate worlds. To close you need to do something like

    $(document).ready(function(){
$('#close').click(function(){
$('#box').hide();
});
});

Or use the css or animation function to get similar results instead of hide(). Hopefully this helps, unless I've mis understood something.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜