27 users online (1 members and 26 guests)  


Page 1 of 3 1 2 3 Last
  Results 1 to 15 of 38

Related

  1. Replies: 0
  2. Replies: 2
  3. Adding values to an external .js Javascript file?    Forum: Javascript Forum
    Replies: 3
  4. call external Javascript(PHP) with passing value    Forum: Javascript Forum
    Replies: 2
  5. passing values to an external .js file    Forum: Javascript Forum
    Replies: 10
  1. #1
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    i too have a problem with passing data

    at the moment i have a password page that emails me a form when the user logs on. the password check in actioned in javascript.

    The problem being is I have a lot of them so each time the password has to change i have to change 40 pages i would like to make an external js file to hold the password check and just call that

    this is the password check script

    <script language="javascript">
    <!--
    //These are the names of the people you don't want

    //To add a person, just put their name in quotation marks
    //and add a comma after
    password = new Array(
    "test",
    "test2@email.com",
    "test3@email.com",
    "test4@email.com",
    "test5@email.com")
    function Check() {
    //Change FORM and FIELD to the form name and field name throughout this function
    passwordchk=document.login.password.value.toLowerCase()
    awdrgy = 0
    aLeRt = 0
    {
    if (passwordchk < password[awdrgy]) {
    aLeRt = 1
    alert("You do not have privileges to use this site")
    document.login.password.value=""
    }
    awdrgy++
    }
    }
    -->
    </script>


    this is the form

    <form action="/cgi-bin/formmail.pl" method="post"name="login" id="login" onsubmit="return FSubmitValidation(this)">
    <input type=hidden name="recipient" value="logon@qualityincomes.com">
    <input type=hidden name="subject" value="Logon to Team Site">
    <input type=hidden name="redirect"value="http://www.xxxxxx.com/team/main.htm" >

    <input type="hidden" name="PAGE" value="none"><input type="hidden" name="REFERRER"
    value="none"><input type="hidden" name="PLATFORM" value="none"><input type="hidden"
    name="LOADING_TIME" value="none"><div align="center"><center>


    <table width=425 border=1 cellpadding=3>
    <tr><td colspan=2><center><font size="+2"><b>Members-Only Area!</b></font></center></td></tr>
    <tr><td>Username:</td><td><input type="text" name="username"></td></tr>

    <tr><td>Password:</td><td><input type="password" name="password" onblur="Check();" onblur ></td></tr>

    <tr><td colspan=2 align=center><INPUT TYPE="SUBMIT" NAME="submitinfo" VALUE="Enter!" CHECKED="CHECKED" STYLE="font-family: Arial; background-color: #33FFFF; color: navy; font-weight: bold">

    &nbsp;&nbsp;&nbsp;


    <INPUT TYPE="RESET" NAME="Reset1"STYLE="font-family: Arial; font-weight: bold; color: navy; background-color: #33FFFF"></td></tr>
    </table>


    all this code works on every page but as you can see it takes a lot of work to open and change all of the password pages.

    any help would be appr

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    This thread is over 2 years old! Please start your own thread for this problem.

    ...Actually I want to answer this problem so I will split the topic.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    All you have to do is put everything that would normally be between the <script> tags and put them in a text file, and save it as , for example, mypasswords.js

    then in each page, add

    Code:
    <script language="JavaScript" type="text/javascript" src="/mypasswords.js"></script>
    Then when you edit mypasswords.js all pages will be updated.

    A word of warning...using JavaScript for passwords is absolutely pointless unless you don't mind anyone being able to see those passwords. 'Cracking' a JavaScript password gate is a bit strong, it doesn't take enough skill to call it cracking. All you need to do is view Source. Anyone can see those passwords!
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  4. #4
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    thanks

    thanks will try this tonight

    the web pages are encrypted when uploaded and the passwords are invisible to everyone

    thanks

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Post (or PM) your website address, I'll grab anyones password you name.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    Question passwords on site

    it would be interesting to see if you could pick up on a password

    there are no user names just passwords

    www.qualityincomes.com/team/

    thanks

  7. #7
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    re useing js file

    sorry to say it didnt work you can put any password in and go through pls advise

  8. #8
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    It doesn't work at all?

    At this point, would you consider using a server-side language for your password gate? Its a LOT more secure.

    The problem with javascript is that its all sent to the browser. The 'encryption' is not encryption at all, its just slight obscufaction. I now have a copy of your script sitting on my desktop.

    With a server-side password gate, NOTHING is sent to the browser except the HTML itself. Perfectly reliable, cannot be cracked without cracking the webserver itself.

    Also, we don't have to write one from scratch, we can download password gateways from hundreds of sources for free.

    Its, of course, your decision. I'll help you no matter which you decide.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  9. #9
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    Wink server side

    not too sure how i would go about that if it means using .htaccess files my web site provider does not allow these files to be uploaded.

    thanks for your help

    I know that my page is not totaly secure but with my limited knowledge its all i have been able to do and pointers in the right direction would be helpful and appricatied

    regards
    Digger

  10. #10
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    and theres more

    i also need the form to be sent when the user logs on

  11. #11
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I notice your form is CGI/Perl, so lets use that for the gateway.
    have a browser through here:

    http://www.hotscripts.com/CGI_and_Perl/Scripts_and_Programs/Password_Protection/index.html

    See if any of those appeal.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  12. #12
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    your information

    thanks will look over tonight

  13. #13
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    Smile sorry

    hi sorry haven't got back i am now looking at the brill amount of code on the site you sent me

    thank you for your help

  14. #14
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Yeah, that sites a lifesaver
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  15. #15
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    cgi script

    hi its me again i have a number of questions

    first why isit when i have followed all the instructions on placeing a file in the cgi bin does it say log not found it is there the chmod has been changed correctly and the file was transferred in asci

    the next question is i am trying to use two cgi scripts one for user logon and the other for user tracking how easy is it to take the username vairable from the password cgi and pass it to the tracking veriable

    i am using the axs comm tracking system.

    thanks
    George



Page 1 of 3 1 2 3 Last

Tags for this Thread