Privacy & Cookies

This website uses cookies. By continuing to use this site you are agreeing to our use of cookies.
Forum Index

Sections

View

Filter topics in this section

Stats

Threads7,073
Posts57,135
Authors6,474

why isn't it working?

Level Discussion > Javascript Levels > Javascript Level 2 > why isn't it working?


    • 1545
    • 40

    0
    I tried modifying the script so it passes whether the condition is true or not. I copied and pasted the same thing to the else block.

    ???


    Edit: So I realized that the e.preventdefault() bit was also there to prevent you from running the code with nothing submited. I tried deleting that bit, but nothing changed. Then I wanted to know if the slightest change ("else{alert('nope, still not the good pass');}) would affect the code. It didn't . Hint needed, is the solution even in the code?is using the console worth it?

    I've tried reading the forum for clues but, seems like nobody has said anything related for two or three years. And the previous replies were for a script that was a different one at the time.
Viewing 4 replies - 1 through 4 (of 4 total)
  • jms1103
    jms1103's profile picture

    • 4710
    • 13

    0
    Focus on the script tags.


    Look for anything that looks like it might be related to the password, whether it be the length, what characters have to be a part of it, anything along those lines.


    Here is what appears at the very bottom of the page:


    <script type='text/javascript'>
    $(function(){
    $('.level-form').submit(function(e){
    e.preventDefault();
    if ($('.level-form #pass')[0].value.length == length){
    document.location = "2?x=" + length;}
    else{
    alert('Incorrect Password');}});});
    </script>

    Now look carefully at this script. This tells you what you need.





    PM me if you're still confused.


    jms1103
  • feuerstein
    feuerstein's profile picture

    • 13160
    • 270

    0
    I think this is a bit to much spoiling
  • jms1103
    jms1103's profile picture

    • 4710
    • 13

    0
    Post updated to reveal less
  • Youss3ff
    Youss3ff's profile picture

    • 1545
    • 40

    0
    Well too late anyway
Viewing 4 replies - 1 through 4 (of 4 total)
You must be logged in to reply to this topic