You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2009/10/12 13:10:56 UTC

t5: redirect to a page in javascript?

Hi,
How to redirect to another page in a javascript? example:
 
function do_proc() {
            saveupdates()
            window.location="items"
        }

this does not work, any idea? Thanks,
-- 
View this message in context: http://www.nabble.com/t5%3A-redirect-to-a-page-in-javascript--tp25853995p25853995.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: t5: redirect to a page in javascript?

Posted by Ville Virtanen <vi...@cerion.fi>.
Hi,

this is not the best place to ask js questions, but my guess is 

1. The window.location accepts only full urls? (Or atleast the context start
/, window.location="/items")
2. Your method never gets called or the execution is halted in saveupdates()
(Which should have ; at the end of the line, like after "items"; also..)

 - Ville


Angelo Chen wrote:
> 
> Hi,
> How to redirect to another page in a javascript? example:
>  
> function do_proc() {
>             saveupdates()
>             window.location="items"
>         }
> 
> this does not work, any idea? Thanks,
> 

-- 
View this message in context: http://www.nabble.com/t5%3A-redirect-to-a-page-in-javascript--tp25853995p25939222.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org