开发者

Close PrettyPhoto and go back to parent?

I have an asp login form that opens into a prettyphoto modal window via iframe from my main asp page.

I can complete this form and login no problem but it loads the protected pages in the prettyphoto modal window. Is it possible to have this window close and redirect to the parent page once login form is submitted?

Example: index.asp has link to login.asp Login Now!

On submission of login.asp it calls another asp file as such:

Else

Session("UserID")= RS("UserID")
Session("UserName")= RS("Name")
Session("Login")= "YES"

Response.r开发者_开发技巧edirect "vipindex.asp"

End If

Is it possible to have the Response.redirect "vipindex.asp" load into the "parent window" closing the current? When I say parent window I mean the original index.asp?

Kind regards

Gary


Instead of redirecting to the vipindex.asp directly you could do

Else

Session("UserID")= RS("UserID")
Session("UserName")= RS("Name")
Session("Login")= "YES"
%>
<script type="text/javascript">
  window.top.location = 'vipindex.asp';
</script>
<%
End If

but keep in mind that this solution relies on javascript being enabled for it to work..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜