a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

JavaScript Question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> JavaScript Question
Page: [1]
 
abbeyvet

 

Posts: 5095
From: Kilkenny Ireland
Status: offline

 
JavaScript Question - 11/25/2001 15:20:00   
I am using a JavaScript to allow users to log in to a directory protected by .htaccess using a form ona page which requests username and password, so bypassing the ugly grey default .htaccess login box.


The script is here btw: http://javascript.internet.com/navigation/htaccess-login.html

It works just fine but I would like to alter it slightly so that instead of a user, on submitting a bad username and/or password, getting a typical JavaScript alert, they are redirected to a specified page.

The relevant line is:

else {
alert("Please enter your username and password.");
}

How do I make the 'else' a redirect to a specified page?


------------------
Katherine

InKK Design
LinKKs - Kilkenny's Online Magazine


-*-*-*-*-*-*-*-*-*-*
"Dogs have owners, cats have staff!"

[This message has been edited by abbeyvet (edited 11-25-2001).]

sarge

 

Posts: 379
From: London England
Status: offline

 
RE: JavaScript Question - 11/25/2001 21:09:00   
Hi Katherine-
I'm no Javascript expert, but I think this works:

else {
document.location = "yourpage.htm";
}

Sarge


(in reply to abbeyvet)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> General Web Development >> JavaScript Question
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts