Closing Shadowbox + Redirect

3 messages Options
Embed this post
Permalink
StephenJacob

Closing Shadowbox + Redirect

Reply Threaded More More options
Print post
Permalink
Hello!

I'm integrating Shadowbox.js into the login system of our website. Upon successful login, I would like to close the ShadowBox and redirect the user to a new URL in the parent frame.

Working script that closes the shadowbox.

<script language="javascript">
self.parent.Shadowbox.close();
</script>

I've been looking all over the forum for help before I decided to post this.... any help will be appreciated!

Thanks!
Stephen
StephenJacob

Re: Closing Shadowbox + Redirect

Reply Threaded More More options
Print post
Permalink
Okay so I just thought of something to try...

I'm using target="_parent" in the FORM tag, but when my form validation returns errors it redirects to the parent frame. I'd like to redirect to the current shadowbox if there are errors... Do you think this possible?
andrewteg

Re: Closing Shadowbox + Redirect

Reply Threaded More More options
Print post
Permalink
I just saw this in another thread but have you tried just reloading the parent page using:

parent.location.href = parent.location.href

This should just reload the page w/o shadowbox and reload the parent page. Seems to work testing though I've not completely integrated it with my CF login system at the moment.