hi,
i make a simple login page, if user successfully enters valid username and password, then it redirects to a welcome page, otherwise i want that my program shows an alert(javascript), and re-directs to the login page again.
i forget the script, its just like document.history(-1)
plz reply
simple problem in login page
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
"document.history(-1)" is not a redirection, fyi.
if you want to use Javascript to do the "redirection" document.location is the object to go through (giving it the url to go to), or you could do it in php using header(), or with a meta-refresh (HTML)
if you want to use Javascript to do the "redirection" document.location is the object to go through (giving it the url to go to), or you could do it in php using header(), or with a meta-refresh (HTML)
Code: Select all
<meta http-equiv="refresh" content="10; url=http://yoursite.com" />