•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,697 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,646 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2332 | Replies: 6
![]() |
•
•
Join Date: Nov 2004
Posts: 44
Reputation:
Rep Power: 4
Solved Threads: 0
Im looking for a way to password protect pages on my site. ive found a few asp scripts only i cannot run asp through my host. is there an html or simple java solution?
and also i want to disable the tool bars in ie. im going to have a targeted link that will pop up when you hit a box and i want it to be free of the status bar and all menu options.
thanks
and also i want to disable the tool bars in ie. im going to have a targeted link that will pop up when you hit a box and i want it to be free of the status bar and all menu options.
thanks
Your going to need to use JS to disable any toolbars and make a new window (click here type of thing)
If you want password protection (like a login) you need to have some sort of SSL(server side language) running on the server. Be it php, asp, perl.
Otherwise apache has built in http auth, which can be done though an htaccess file, but adding users and passwords is slow.
If you want password protection (like a login) you need to have some sort of SSL(server side language) running on the server. Be it php, asp, perl.
Otherwise apache has built in http auth, which can be done though an htaccess file, but adding users and passwords is slow. Firefox: no, its not the end all solution, it has its own issues and in time it will be just as insecure as IE, when its hit Firefox 6, if it makes it that far. Oh, and AOL pays for it, incase you didn't know.
Microsoft & Windows: If you hate it so much, move to linux, or bsd, or anything else, stop complaning and move on.
Good starting places: Gentoo Novell SUSE Fedora Core Apple
Microsoft & Windows: If you hate it so much, move to linux, or bsd, or anything else, stop complaning and move on.
Good starting places: Gentoo Novell SUSE Fedora Core Apple
•
•
Join Date: Nov 2004
Posts: 44
Reputation:
Rep Power: 4
Solved Threads: 0
•
•
•
•
Originally Posted by Zachery
Your going to need to use JS to disable any toolbars and make a new window (click here type of thing)
If you want password protection (like a login) you need to have some sort of SSL(server side language) running on the server. Be it php, asp, perl.Otherwise apache has built in http auth, which can be done though an htaccess file, but adding users and passwords is slow.
Thanks for the reply but what really bothers me about this site and im not going to rant on it but ive gotten it in every question ive ever posted is having what i already know reposted as a response.
in october i will have asp availability i do not now because im using the cheap goddady.com hosting option. i just needed a host so i could upload my information so that i could get everything together. i was just hoping that i could protect it short term so only the people i want to access it could. even if theres just an html pop that wont go away without having a specific word put in a text block would work.
in terms of the tool bars ive found .hta which will do exactly what i want only it sets off all sorts of warnings on my pc about attacks and on other computers ive tested it on it tries to download it.
does anyone know the java to remove tool bars. i guess what im looking for is to create a gallery similar to what startrek.com does when you hit an image and it pops up in another smaller window with no tool bars and no resize option.
if i can get the code i can edit to my needs i can read java but im no good in writting it. even if someone knew a resource good enough for me to go and learn i would be appreciative.
•
•
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation:
Rep Power: 4
Solved Threads: 3
Its not a good way to get help if you offend the moderators...
You don't want Java to remove toolbars, you want to use Javascript. Something like this:
And even though you said you already know it... I don't think Zachery's advice really sunk in. You can't password protect anything using Javascript... If you put a password on the page in javascript, then the user needs to download the source for your page before the Javascript protection works.. so it only stops the extremely stupid from whatever it is you are trying to protect.
So the easiest way to password protect anything on a webserver is using server side authentication... this is available with all decent webservers.
You don't want Java to remove toolbars, you want to use Javascript. Something like this:
<a href="" onclick="window.open('', 'tinyWindow', 'width=150,height=100')"> open new window </a>
And even though you said you already know it... I don't think Zachery's advice really sunk in. You can't password protect anything using Javascript... If you put a password on the page in javascript, then the user needs to download the source for your page before the Javascript protection works.. so it only stops the extremely stupid from whatever it is you are trying to protect.
So the easiest way to password protect anything on a webserver is using server side authentication... this is available with all decent webservers.
•
•
Join Date: Nov 2004
Posts: 44
Reputation:
Rep Power: 4
Solved Threads: 0
2 things
1 im sorry and
2 thank you.
like i said before hand i didnt want to rant but i just get annoyed and it happened alot so im sorry.
and thank you im going to try that out.
in terms of passwording the page i understand the passoword would be in the code of the page but subsiquently it would be the extremely stupid i am trying to keep out. i'll just have to upgrade to the higher level and run asp.
thanks again
1 im sorry and
2 thank you.
like i said before hand i didnt want to rant but i just get annoyed and it happened alot so im sorry.
and thank you im going to try that out.
in terms of passwording the page i understand the passoword would be in the code of the page but subsiquently it would be the extremely stupid i am trying to keep out. i'll just have to upgrade to the higher level and run asp.
thanks again
•
•
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation:
Rep Power: 4
Solved Threads: 3
What people usually use as a javascript password 'protector' is a prompt for a password and or username...
then you just compare this to some string in your page and if its valid then redirect them (or show them the right page) otherwise redirect them somewhere else...
of course you can make this more complicated, but the folley of any such device is that you must present the code to the browser... all they need to do to get the password is view the source when loading (or turn off javascript and view source).
there are increasing levels of complexity you can apply, but i find that these added measures simply amuse me and encourage me to decipher why it is being hidden
then you just compare this to some string in your page and if its valid then redirect them (or show them the right page) otherwise redirect them somewhere else...
of course you can make this more complicated, but the folley of any such device is that you must present the code to the browser... all they need to do to get the password is view the source when loading (or turn off javascript and view source).
there are increasing levels of complexity you can apply, but i find that these added measures simply amuse me and encourage me to decipher why it is being hidden
•
•
Join Date: Nov 2004
Posts: 44
Reputation:
Rep Power: 4
Solved Threads: 0
thanks a mill for that one its exactly what i wanted. i knew that it would be in the code of the page. of the dozen or so people who will have access untill late october the one person smart enough with coding to find it will have the password.
to anyone who passes by here the page that i found with the code he mentioned is:
http://javascript.internet.com/passw...rs-source.html
everything ive ever learned is on google!!
one question though about the first snippet of code you gave me for the page pop up on IE it works like a charm on firefox it opens the pop up and reopens the original site with the link so instead of having two pages the original and the pop up i now have the original the pop up and the original copy. any clue on that one?
to anyone who passes by here the page that i found with the code he mentioned is:
http://javascript.internet.com/passw...rs-source.html
everything ive ever learned is on google!!
one question though about the first snippet of code you gave me for the page pop up on IE it works like a charm on firefox it opens the pop up and reopens the original site with the link so instead of having two pages the original and the pop up i now have the original the pop up and the original copy. any clue on that one?
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Question regarding Title (ColdFusion)
- HTML question about creating a certificate form? (HTML and CSS)
- html question (PHP)
- A php question (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Make An Asp Popup Window--help Me About This...
- Next Thread: JScript General Questions


Linear Mode