HTML - Password Protecting Webpage
Hi There!
I'm trying to password protect a page in my website. I got this code from DHTML and was wondering how it could be modified so that it would display in a new window. Cus when I do it now, it just displays the page in the frame I have (and the password protected page, uses another frame so it displays as 2 frames and gets confusing). Any help would be appreciated!! function submitentry(){ password = document.password1.password2.value.toLowerCase() username = document.password1.username2.value.toLowerCase() passcode = 1 usercode = 1 for(i = 0; i < password.length; i++) { passcode *= password.charCodeAt(i); } for(x = 0; x < username.length; x++) { usercode *= username.charCodeAt(x); } //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD if(usercode==142703219952000&&passcode==1809918190080) //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD { window.location=password+".htm"} else{ alert("password/username combination wrong")} } </script> </div> <form name="password1"> <p align="left"><strong>Enter username: </strong> <input type="text" name="username2" size="15"> <br> </p> <p align="left"><strong>Enter password: </strong> <input type="password" name="password2" size="15"> </p> <p align="center"> <input type="button" value="Submit" onClick="submitentry()"> </p> </form> Similar TutorialsI have been through Google, but am unable to find a semi-simple way of doing this... Basically I am looking to make someone enter a username and password before they are allowed to view a webpage. Like... if someone goes to http://www.test.com/test1.html, a window pops up and they are forced to enter a username and password that I can specify and change for every page. So if they go to http://www.test.com/test2.html.... it would be a different UN and PW (again, that I can specify). I believe it is some sort of javascript that I need... but I cannot figure out a way to make this work without having the username and password be in some openable file that can be viewed to find out the password n such easily. Just had my first product approved on Clickbank and don't want to start selling before I have protected my thank you page (where my downloads are from theft and sharing) I am new to this and I need to know how can I cloak the address of my thank you page so that it's not shared. Thanks E I have a web site where some of the pages are password protected using php script. This works fine on html pages, but I also have some pdf files that I want to protect. Now the pdfs are not protected. They are linked to images in an index page and when the image is clicked, the pdf is opened in a new window. I now want to protect the pdfs. I want my users to be able to access the index page and see the images, but when they cliick the image to the view the actual pdf, they are prompted for a usercode and password. Since the protection I use on my protected html pages is based on php, I assume I will have to create a cover page for each pdf and link the index page image to that php page instead of the pdf. This I know how to do. What I don't know how to do is to have the php page open the pdf directly without user intervention and when the pdf window is closed by the user the php page also closes and returns the user to the image index page. In other words, I want the php page to be completely invisible to a user who has already logged on and invisible except for the login prompt for the user who has not yet logged on. Anyone have any suggestions? Ive already read all the posts about this but I need some help. I have a bunch of images in a scrollbox on my myspace. I love sharing photos with my friends but somehow my friends send me fake profiles of me. I would like to know if theres anyway to protect them whether it be by no right click, a clear gif, etc. The thing is I make my page with MyGen.UK gen and I dont know what code to use or what to do? I trust most of my close friends but I dont know why people keep using my pictures and making a fake profile. I really dont want to have to take them down so if anyone could help me out that would be great? I have found a way to protect images I have tested my code in different computer with different browsers and it works except in one browser, I didn't used javascripts or php. You can tested by going to files.combbat21.com/website/images you will see a lot of images click on a image and try to see it, now go to demo.combbat21.com every image in that page comes from files.combbat21.com/website/images try to download any image. I'm giving the code away just email me to cuestadaniel31(at)gmail.com. 1. How to protect a HTML file to avoid to run it from other URL? (then I would encrypt the HTML) 2. How to avoid to run the rest of HTML code if a URL/picture is not found? Sorry if i posted this in the wrong location. So im a real estate agent making a website. Im no pro and most of the stuff ive been using to build has been through layouts/generators/help of others such as yourselves. So ive been stuck on finding/making this code for the past couple of days. So all my listings are on my agencys website, not my personal agent website. Is there a code i could have where in the listings page my my personal agent website, i could have a window maybe 600x900 of the listing page on my agencys website? To kind of clear things up, you know how when you google something you have the magnifying glass, how it gives that preview. How can i have that preview coded onto a webpage, but me say what webpage to preview and how big to make the preview box? Tried to explain it as best i could. If you dont know the code, if you can tell me what its called so i can try to narrow the google searches. So far everything that has been coming up in the search restults has been preview boxes to preview html codes you have already written. Fail Blog Thanks I'm a novice compared to the pros here and stuck on a couple issues. My website is uspsrealty.com There is some "empty" space on my home page below the horizontal line. I want to remove the horizontal line and have the ability to use that empty space without throwing my borders/margins off. I would like to add about 3-4 sentences in that blank area. Can this be changed so I can add a few sentences? I know why this is happening, just don't know how to correct it. Also want to change the copyright.jpg to 2010 from 2009. Might as well make up a few more jpgs with the years 2011, 2012, 2013, 2014, and 2015 Willing to paypal you money for your help. Hoping one of you pros can do this in 30 min and willing to pay $25-30. Contact me he galevin@hotmail.com Thanks, Gerald Levin Hi, i have a problem im not sure how to go about it . I have a webpage where the user enters there personal details . As they are fillign in details they click a link and another webpage is opened ( keeping the orginal open ) Where the do some other stuff on this new page and what is created is a javascript array of numbers I then want them to be able close this new window down and the javascript array data will be submitted with the rest of the personal information when the click a submit button on the first page . If this makes sense how do i go about this? Thanks how do i make a background image fit to the window. also i have a button on a page. how do i get it to close the window uppon clicking it. any help would be great. I've done a search on here, and have spent the last week or searching on google, I'm currently building a webpage up which integrates a forum, i want to put a feed on the home page of the site of the latest topics from the forum. The feed address is: feed://guitarprojectuk.forumotion.com/feed/ and the actual website address is: http://www.guitarprojectuk.com I've tried a few on google, and non seem to work, not sure wether its the feed or something i'm doing, so can somebody help me out? Thanks, Tom. Hello, I remember something like this, which is you have an xhtml form, you have textboxes, buttons etc, then the user clicks on the submit button triggers the sendform feature element and sends it to the email address specified. How do you do that in html? i remember it was like send form, then the email address etc etc and anything between the send form tag is where it will email anything in the text box fields. if you can send me an example that would be great. Thanks Take a look at this image. What I want to do is make the background black (which I know how to do), but to add in the black header plus the gray box--same width. What I'm trying to do is my forum is fixed width (in the center, not expanded on browser) and I want to do the same to a new non-forum site starting from scratch. Hi, I am VERY new to web development and I am making a page for my friend. Here's what I am trying to do, I want to use an image that is about 500 pixels high for the background of my page, and then whenever the text grows past that 500 pixels I want to start tiling a different image. Right now i'm just using a table and I have the image as the background. But as expected this just tiles that image over and over again. Is there a way to have it tile a different image without splitting the text up into two tables? Thanks! Evan Hey guys(and girls ), Here is my problem i would like to make a webpage like this: ---------------------HEADER--------------------- ---------------------php script------------------- ---------------------FOOTER--------------------- (Show Word) <-- When i click this, the page will be refresh so the php script will echo a random word, but if i do that every time i refresh the page i dont want to refresh the Header and Footer. My idea was to use iFrames... Is there any other way? Thnxs!!! May I know how can make sure that my website fit under any resolution with out using Table(table,tr,td) in html??? I'm trying to learn a little bit of html. I've got some basic knowledge now, but I can't figure out one thing. I want to make a button to go to another webpage. How do I add webpages to my website and access them through a button? I have a website that when I type in the url nothing appears on the page. I was wondering what would cause this to happen. I tried to re-saving the files for the website but still nothing, it just says Done in the bottom tray of the IE window. Thanks in advance! Hi, Can anyone help me work out how to create a tab on the left hand side of the browser window, a bit like the Convotrack one he http://www.dannywhatmough.com/ Obviously I would want to use my own image/text and just link it to a webpage. Do I need to use javascript? Danny Hi, I'm new to the site and I'm just here to ask a question. I've been having trouble with my webpage trying to center everything. The problem is that at home my webpage is centered (When you zoom out everything stays centered) but as for school I zoom out and everything stays to the left and I'm pretty sure I left all the code the same from computer to computer. I don't think it is the resolution because I had changed my resolution to the same as at school. This is my coding (I'm an amateur at Html and don't know CSS): <title>Home - WebBanners</title> </head> <p align="center"> <div style="position:absolute;top:0px; left:0px; right:0px; bottom:0px;" align="center"> <body topmargin="0" leftmargin="0" bgcolor="#0099FF"> <img src="Banner.gif" width="1280" height="290" border="0" usemap="#Map" /> <map name="Map" id="Map"> <area shape="rect" coords="140,233,302,285" href="Home.html" /> <area shape="rect" coords="330,233,543,286" href="Samples.html" /> <area shape="rect" coords="565,240,722,287" href="Prices.html" /> <area shape="rect" coords="752,229,905,286" href="About.html" /> <area shape="rect" coords="945,235,1122,284" href="Contact.html" /> </map> <font face="Georgia, Times New Roman, Times, serif" size="+4" color="white"><p align="center"> <u> Welcome To WebBanners!</u></p></font> </p> <table align="center"> <tr> <td><font face="Georgia, Times New Roman, Times, serif" color="black" size="7"><strong>H</strong></font> <font face="Georgia, Times New Roman, Times, serif" size="+2" color="white">ere we make special just-for-you banner. <br /> <br> <font face="Georgia, Times New Roman, Times, serif">Every banner is unique to the person who have ordered them.<br /> <br><font face="Georgia, Times New Roman, Times, serif">They are sold at a reasonable price and if you don't <br>like them then we offer full money back guaranteed. <br /> <br /> We also have an interactive department where you can <br />talk to one of 'us' through the microphone so we can help you. <br />All you have to do is ask through the E-mail. <br /> <br /> We can make tons of banners for your website such as the one above <br />or see more <a href="Samples.html">Here</a> <br /> <br /> We have prices for your special needs. <br />All of the banners we offer are your ideas. <br />Ask and we can do it for you! Click <a href="Prices.html"> Here </a> for prices. <br /> <br /> Want to learn more about us? Click <a href="About.html"> Here </a> for more information. <br /> <br /> Going to buy one of our offers? Need help in finding something? <br />Click <a href="Contact.html"> Here </a> to contact us! For your design! </font> </td> <td align="center"> <font face="Georgia, Times New Roman, Times, serif" color="Green" size="+3"><u><strong>So Why Pick Us? </font> </u> </strong> <br /> <br /> <font face="Georgia, Times New Roman, Times, serif" color="Green" size="+2"> <li>We have 100% Money Back Guarantee <br /> <li>Satisfaction Guarantee<br /> <li>Our Prices beat the Competitors<br /> <li>24 Hour Service <br /> <li>Interactive Department <br /> <br /> <br /> <br /> <img src="Ordernow!.gif" /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> </body> </html> |