Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Help with some Javascript
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

silent_frosty
Junior Member

USA
178 Posts

Posted - 21 September 2003 :  20:24:41  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
I just installed a password protection script (I know people can still get in, but I can't use CGI on geocities), but I need help on relocating it, and theres a problem with typing in your password. you have to click the box on the edge, not inside of the box like other sites...and help on this one

My bad, I forgot to post a link- http://www.geocities.com/silent_frosty/memberarea

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.

Edited by - silent_frosty on 21 September 2003 20:31:45

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 September 2003 :  20:36:40  Show Profile  Visit dayve's Homepage
your <div> tags are layered over your form preventing you from clicking on it properly.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 September 2003 :  20:41:11  Show Profile  Visit dayve's Homepage
this is the one causing your problem

<DIV id=root
style="LEFT: 0px; WIDTH: 781px; POSITION: absolute; TOP: 0px; HEIGHT: 368px">

personally I would add a color attribute to your div to help you visually see the area it is taking up, and then take it off when you are done. for example, try this:

<DIV id=root
style="background-color : #FFFFCC;LEFT: 0px; WIDTH: 781px; POSITION: absolute; TOP: 0px; HEIGHT: 368px">

you will now see yellow filled in the area that this <div> is covering and as you will also notice, the password field is hidden by that layer. you may also try changing the z-index value although I would focus on resizing the <div>

Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 21 September 2003 :  20:56:31  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
I know its frustrating dealing with a newbie at coding, but could you put it in simpiler terms or something? I know nothing about DIV's or Javascript...sorry

I didn't write the code, I got it from javascript.internet.com

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.

Edited by - silent_frosty on 21 September 2003 20:57:13
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 September 2003 :  21:38:13  Show Profile  Visit dayve's Homepage
Just remove this line completely and it will work fine.

<DIV id=root
style="LEFT: 0px; WIDTH: 476px; POSITION: absolute; TOP: 0px; HEIGHT: 206px"></DIV>


Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 21 September 2003 :  21:48:02  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
That line isnt in my script anywhere...i think geocities puts it in automatically...here is my script

<center><form name=login>
<table border=1 cellpadding=3>

<!-- Original: Dion -->
<!-- Web Site: http://www.iinet.net.au/~biab/ -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<tr><td colspan=2 align=center><font size="+2"><b>Members-Only Area!</b></font></td></tr>
<tr><td>Username:</td><td><select name=memlist>
<option value='x'>
<option value='Admin|57388|QNUZOPFM'>Admin
<option value='socca playa|25447|XKUVTOBM'>socca playa
<option value='Wizzer|4|QFRSONAL'>Wizzer
<option value='Test|25447|XKUVTOBM'>Test
<option value='silent frosty|57388|QNUZOPFM'>silent frosty
</select></td></tr>
<tr><td>Password:</td><td><input type=password size=10 maxlength=8 name=pass></td></tr>
<tr><td colspan=2 align=center><input type=button value="Login" onclick="check(this.form)"></td>
</tr>
</table>
</form>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var params=new Array(4);
var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI";
function check(form) {
which=form.memlist.selectedIndex;
choice = form.memlist.options[which].value+"|";
if (choice=="x|") {
alert("Please Select Your Name From The List");
return;
}
p=0;
for (i=0;i<3;i++) {
a=choice.indexOf("|",p);
params[i]=choice.substring(a,p);
p=a+1;
}
h1=makehash(form.pass.value,3);
h2=makehash(form.pass.value,10)+" ";
if (h1!=params[1]) {
alert("Incorrect Password!"); return; };
var page="";
for (var i=0;i<8;i++) {
letter=params[2].substring(i,i+1)
ul=letter.toUpperCase();
a=alpha.indexOf(ul,0);
a-=(h2.substring(i,i+1)*1);
if (a<0) a+=26;
page+=alpha.substring(a,a+1); };
top.location=page.toLowerCase()+".html";
}
function makehash(pw,mult) {
pass=pw.toUpperCase();
hash=0;
for (i=0;i<8;i++) {
letter=pass.substring(i,i+1);
c=alpha.indexOf(letter,0)+1;
hash=hash*mult+c;
}
return(hash);
}
// End -->
</script>
</center>

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.
Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 21 September 2003 :  21:56:36  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
Ok, I fixed it. I had the script in a Script Box like i always do with scripts, but i guess it needed to be somewehre else. I had to go into the Head Tag properties, and i put it there...works fine now, so ill keep that in mind when i go to put another one in. :P thanks anyways dayve, nice to know people care

BTW- do you think that this is an OK passowrd protection script? (for being a javascript and not a CGI)


Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.

Edited by - silent_frosty on 21 September 2003 21:58:01
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 September 2003 :  23:16:18  Show Profile  Visit dayve's Homepage
I don't think it is a good encryption tactic only because the source code shows enough information for someone to "reverse engineer" the process.

Why not get an account with Brinkster and then you can take advantage of server side processing using ASP? Then you can take advantage of the sha256 encryption that Snitz Forums use.

Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 22 September 2003 :  15:57:22  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
quote:
Originally posted by dayve

Why not get an account with Brinkster and then you can take advantage of server side processing using ASP? Then you can take advantage of the sha256 encryption that Snitz Forums use.



Because I like using Geocities Pagebuilder so I can edit sites quickly and easily . I have an account with brinkster (my forum in my sig.) already too, but oe of these days I'll be gettin a domain so I'll be able to get better protrection. But, its not like theres really anything on my site that really needs password protection, its really just for my own pleasure and for testing scripts and things out.

Oh, another thing dealing with Javascript. Well i guesst hsi is CSS mostly. Can you make the scrollbars backround transparent? Heres the CSS that I use on my site-

<Style type="text/css"><!--
Body { ScrollBar-Face-Color: #DFDFDF; ScrollBar-HighLight-Color: #000000; ScrollBar-Shadow-Color: #000000; ScrollBar-3DLight-Color: #FFFFFF; ScrollBar-Arrow-Color: #000000; ScrollBar-Track-Color: #FFFFFF; ScrollBar-DarkShadow-Color: #FFFFFF; }
--></Style>

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.

Edited by - silent_frosty on 22 September 2003 16:15:41
Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 22 September 2003 :  18:03:25  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
What are the restrictions on using an .js file? so people cant really access the code easily??

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 22 September 2003 :  21:30:49  Show Profile  Visit dayve's Homepage
.js files are just as easy to access. the only way you can securely hide your code is by using server side code.

a recommendation for if you ever become ready to do some real web development. Stop relying on page builders like the ones Geocities and others give you.

scrollbars can not be transparent, but you can turn them off if you want.

Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 22 September 2003 :  21:42:14  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
Yeah, I know I should stop using pagebuilders and stuff, but their soo easy to edit pages with. In 15 seconds I can change the whle page around and have it saved.
Even though I tell people that I know nothing about HTML, I can still write a decent page, but it takes fricken forever for me! I always forget the / to end functions and little things like that, so thats why I use WYSIWYG more than raw HTML...

How do you turn off the scrollbar? I remembered seein that somewehre, but could find the page again :(

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 22 September 2003 :  23:03:13  Show Profile  Visit dayve's Homepage
you're never going to learn this way, so I'm kicking you out of the birdies nest and asking you to start by looking here:

http://www.w3schools.com

for the scrollbars, they can only be removed in frames or new windows.

Go to Top of Page

silent_frosty
Junior Member

USA
178 Posts

Posted - 23 September 2003 :  16:08:07  Show Profile  Send silent_frosty an ICQ Message  Send silent_frosty a Yahoo! Message
another reason I gave up on HTML was because I didn't understand how to use tables and frames to organize the page, no matter how much I read up on it...but ok, ok I'll try learn again how to write advanced pages in HTML...But, (theres always a but involed :P) I'm still gonna use pagebuilder to make sites for friends, cuz I dont spend much time on those site, just a basic layout and some text. But I'm readin up on HTML and CSS on W3C, so I hope yur happy. :P

Life is a waste of time. Time is a waste of life. So get wasted all of the time and have the time of your life.

Edited by - silent_frosty on 23 September 2003 17:03:29
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.46 seconds. Powered By: Snitz Forums 2000 Version 3.4.07