[Year 12 IT Apps] Setting up a username and password in Dreamweaver 5.5

Peter Langham peterlangham1983 at gmail.com
Thu Feb 21 11:48:53 EST 2013


If you paste the text from the attached txt file into the code for a layer

Like this:

<div id="Layer1" style="position:absolute; width:200px; height:115px;
z-index:1">
///insert code here/////
</div>

You'll get a nice little working javascript username and password. You
can modify the usernames and password by modifying the code.

If you don't want to do that, you can use the username "test" and
password "test".

If you open the txt file it may look complicated, but it's really as
simple as just pasting it into a layer.

On Thu, Feb 21, 2013 at 11:11 AM, Mark <mark at vceit.com> wrote:
> When it comes to real directory protection, I use the 'Password Protect
> Directory" feature built into Cpanel, which many people use to configure
> their domains.
>
> Doing it client-side would be mighty tricky - and not too secure, come to
> think of it.
>
>
> On 21 February 2013 10:42, Paul Golub <golupau at santamaria.vic.edu.au> wrote:
>>
>> Hi Vera,
>>
>>
>>
>> I get my students to do the same as Mark mentioned below.
>>
>>
>>
>> Paul Golub
>>
>> Santa Maria College
>>
>> 50 Separation St
>>
>> Northcote 3070
>>
>> 9489 7644
>>
>>
>>
>>
>>
>>
>>
>> From: itapps-bounces at edulists.com.au
>> [mailto:itapps-bounces at edulists.com.au] On Behalf Of Mark
>> Sent: Thursday, 21 February 2013 7:20 AM
>> To: Year 12 IT Applications Teachers' Mailing List
>> Subject: Re: [Year 12 IT Apps] Setting up a username and password in
>> Dreamweaver 5.5
>>
>>
>>
>> Hi Vera. If you need this for U3O1, kids don't need to actually implement
>> strict security. They can simulate it instead.
>>
>> One trick is to create a login box as an image and define a hotspot over
>> the "login" button that takes them to another page that looks like they have
>> successfully logged in.
>>
>> This shows kids understand the need for a secure login without having to
>> actually implement it.
>>
>> Another method is to use a form with text boxes for username & passwords
>> with buttons to simulate a login button.
>>
>>
>>
>> However, if you REALLY need to get a working login, I can't really help.
>>
>>
>>
>> Cheers
>>
>> Mark
>>
>>
>>
>> On 20 February 2013 16:12, Vera Cook <vcook at mscw.vic.edu.au> wrote:
>>
>> Hello everyone,
>>
>>
>>
>> I was wondering if anyone has set up a password and username to work and
>> link to appropriate pages. I have set the username as a form text box and
>> the password as a spry validation rule and tried to use server behaviours to
>> have user authentication and restrict access to the page.
>>
>>
>>
>> Please help if anyone knows???
>>
>>
>>
>> Thankyou Vera
>>
>> ________________________________
>>
>>
>>
>>
>>
>> --
>>
>> Mark Kelly
>>
>>
>
> --
> Mark Kelly
> mark AT vceit DOT com
> http://vceit.com
>
>
> _______________________________________________
> http://www.edulists.com.au - FAQ, resources, subscribe, unsubscribe
> IT Applications Mailing List kindly supported by
> http://www.vcaa.vic.edu.au/vce/studies/infotech/itapplications3-4.html -
> Victorian Curriculum and Assessment Authority <br>
> http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers
> Association Inc <br>
> http://www.swinburne.edu.au/ict/schools - Swinburne University
-------------- next part --------------
  <script type = "text/javascript"> 
 
// Note: Like all Javascript password scripts, this is hopelessly insecure as the user can see 
//the valid usernames/passwords and the redirect url simply with View Source.  
// And the user can obtain another three tries simply by refreshing the page.  
//So do not use for anything serious!
 
var count = 2;
function validate() {
var un = document.myform.username.value;
var pw = document.myform.pword.value;
var valid = false;
 
var unArray = ["test", "Philip", "George", "Sarah", "Michael"];  // as many as you like - no comma after final entry
var pwArray = ["test", "Password1", "Password2", "Password3", "Password4"];  // the corresponding passwords;
 
for (var i=0; i <unArray.length; i++) {
if ((un == unArray[i]) && (pw == pwArray[i])) {
valid = true;
break;
}
}
 
if (valid) {
alert ("Login was successful");
window.location = "protected.html";
return false;
}
 
var t = " tries";
if (count == 1) {t = " try"}
 
if (count >= 1) {
alert ("Invalid username and/or password.  You have " + count + t + " left.");
document.myform.username.value = "";
document.myform.pword.value = "";
setTimeout("document.myform.username.focus()", 25);
setTimeout("document.myform.username.select()", 25);
count --;
}
 
else {
alert ("Still incorrect! You have no more tries left!");
document.myform.username.value = "Refresh to try again";
document.myform.pword.value = "";
document.myform.username.disabled = true;
document.myform.pword.disabled = true;
return false;
}
 
}
 
</script>
   <form name = "myform">
<p align="left"><span class="style11">ENTER USER NAME
  <input type="text" name="username">
</span>  <span class="style11">ENTER PASSWORD</span>  
 
  <input type="password" name="pword">
</p>
<p align="center" class="style13"> <a href="signup.html">Sign Up</a> | <a href="resetpassword.html">Have you forgotten your password?</a></p>
<p align="right">
  <input type="button" value="Login" name="Submit" onClick= "validate()">
</p>
 </form>


More information about the itapps mailing list