I have on log in page if user enters both user name and password same then i have to forward user to next page how is it possible.
how do i do this?
It will be better if you can do this in the server side language itself. You will be validating the user credentials using a server side language and if that evaluates to success then you can redirect the page to a new one from there itself. No need to do this in javascript.
window.location = '/next-page';
Plain JS...
have some server side authentication in PHP and if that succeeds, use client side stuff (jquery or JS) to redirect
Try this:
window.location.replace("http://stackoverflow.com");