开发者

Login form inside iFrame - refresh parent frame (once) on successful login?

I have a PHP login form/script running inside an iFrame on my home page. I'm hoping there is a way to reload the parent page on sucessful login. I have tried inserting

parent.location.reload()

at the end of the scri开发者_Python百科pt, but that put my login form into an endless loop. is there another way to do this?

Thanks!


If you're reloading the entire page, why don't you set the target of the form to be _top?


Try top.location.reload() especially if you are using IE


Why are you using an iFrame? Maybe you should consider an ajax solution. It has many advantages over an iFrame approach! ;)

Take a look at this website, they even explain how to do basic client-side validation : http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/

If you want to do more complex client-side validation, maybe you should go for the validation plugin on top of jQuery: www.bassistance.de/jquery-plugins/jquery-plugin-validation/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜