Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

eyeless71's Avatar
Member
0 0

I can't figure out how to get the value for the variables v3 and e4. They are supposed to be substrings of s1 and a2, however I don't know how to get the full strings for s1 and a2. I've tried injecting with alert(document.var name) and it says undefined for every variable. I looked at what s1 and a2 are supposed to be set to, and it's a hex color code, for which I can't find an actual name. I've also tried taking the substrings out of the hex color code, but that didn't even have enough characters. I saw in other threads something about a "vital variable" that didn't have a value, but the only variable that doesn't have a value is input, and that is given a value from the prompt box. I don't know if I just don't understand javascript enough, which is definitely possible as the only language I know is C++ and even my knowledge on that is very limited, or if I'm looking at this the wrong way.


thehare's Avatar
Member
0 0

I`ll give you a hint, make sure you look at the ENTIRE sourcecode, and if you think you are maybe you should look at your scroll bar(s) ;)


puritys's Avatar
Member
0 0

Download source code Edit Test Done


eyeless71's Avatar
Member
0 0

thehare wrote: I`ll give you a hint, make sure you look at the ENTIRE sourcecode, and if you think you are maybe you should look at your scroll bar(s) ;)

I assume you're talking about the declaration of the v3 and e4 variables, which I saw. I know that : v3=s1.substring (6,9)+a2.substring (2,8); e4=v3.toUpperCase ();

The problem is that s1 is set to window.document.bgColor and a2 is set to window.document.linkColor. I see bgcolor is set to #D0D0D0 and link(assuming it is the same as linkcolor) is set to #FF9900, but neither of those is long enough for the subtrings in v3, and I can't find the actual color names for those hex codes either.


thehare's Avatar
Member
0 0

Trust me when I say everything you need is on the page (I actually just tried the challenge again to refesh my memory).

I recommend if you are really stuck, and you use chrome or FF, go to your tool bar: web developer -> sketchpad. Sketchpad runs javascript and will make your life incredibally easy if you're having difficulty with some of these JS challenges. Just got to play with the code a bit, then BAM, you have your answer.

You can PM me if you need help but dont want to post any spoilers here.