开发者

modal window redirect

开发者 https://www.devze.com 2023-01-26 12:00 出处:网络
I\'m using modal window in my project for users login. In that window I\'m using iframe to show 开发者_高级运维login form.

I'm using modal window in my project for users login. In that window I'm using iframe to show 开发者_高级运维login form.

How do I reload main page (not modal window) if the user is successfully logged?


You can use the target attribute on a link, or on the form itself. For example

<form target="_parent"....

or

<a href="..." target="_parent"...

This will update the parent of the iframe instead of the iframe. Alternatively you could fire some JavaScript to reload the main page if the login is correct. Something like:

parent.location.href = 'loggedin.html'
0

精彩评论

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