You can just use $('#pass').val(); //.val() to jQuery
and analyze the code. Console in this level is your friend.
?
in firebug this code :
shows me what I input in the fieldset label-form name=pass
if I use this straight code
alert($(‘#pass’).val())
it returns a blank message box
And if you said that thecode is the correct variable and I need to get its value
this code returns undefined…
Is var x = $(thecode).val() similar to $(‘.level-form #pass’)[0].value == thecode ??
Your code have some logic errors. jQuery syntax:
[list]
[] A $ sign to define/access jQuery
[] A (selector) to “query (or find)” HTML elements
[*] A jQuery action() to be performed on the element(s)
[/list]
I suggest you read about it http://www.w3schools.com/jquery/jquery_syntax.asp pm me to prevent spoilers.
?
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\’‘ at line 1
I don’t think I understand the quirks of JS in regards to reading the value of the variable.
Why is it that console.log(thecode); will not work and gives you the wrong value of “undefined”
however window.prompt(); and window.confirm(); and window.alert(); and document.write(); all give you the value of the variable?
What am I missing about console.log() that the other display methods do differently?
Please let me know if this is too much of a spoiler.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\’‘ at line 1