I have page containing a web2py form, and the page is meant to be viewed in an iframe. However, if the form validates, I need to escape the iframe by opening the action URL in a new tab, e.g. using target="_blank" (this is a redirect to a PayPal payments page, which is why it will not work in an iframe). However, if the form does *not* validate, I want to stay within the iframe and reload the form elements with the validation recommendations shown. I can't figure out how to do this.
It seems like I should abstract the form into a .load component, and use the web2py LOAD function to keep reloading the form into the embedded page, which presumably uses the onsubmit event to reload the component. But I can't work out how to change the form target to "_blank" *after* successful validation. Has anyone come across this problem before, and are there any solutions? Thanks! Yan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/1cc18ddd-973b-45f4-9284-cd56d84157cd%40googlegroups.com.