I am getting an error on line 371 which is the last line below – basically, I want to override the popup when you click the link REQUEST ADMIN PRIVILEGES here http://www.albumpl.us/gallery/trial/photos
extraTestButtons.append('<a href="mailto:adminplease@albumpl.us">Request Admin Privileges</a> | | <a href="#">Turn SMART BROWSE (ON)</a> | ' +
' | <a href="#">Purchase prints and other merchandise</a>|| <a href="http://www.albumpl.us/gallery/#{gal_code}/live">Live View</a>')
extraTestButtons.find('a').click ->
if $(this).text() == 'Request Admin Privileges'
return false
showNotYetAvailableMessage($(this).text())
By cracking open your post (using the edit feature of Stack Overflow), I saw that your second line and
extraTestButtons.findline is using tabs where everything below it is using spaces.You need to be consistent with your whitespace. Either use tabs everywhere or use spaces everywhere, but once you start mixing, bad things happen. It completely confuses the compiler because your whitespace is “significant”. It would be like having a language that allows
{ foo() }or[ foo() ]for block specification, but you were to use{ foo() ]. The compiler doesn’t know what you mean.Oftentimes, the CS compiler will barf on you because it doesn’t make sense. Other times, it makes sense to the compiler but it wasn’t what you wanted. Other times, the result is what you expected but not for the reason you intended.
Whatever the case, you should use an editor that will let you know of these issues. In my case, I prefer spaces always and I tell my editor to turn my tabs into spaces so that I never use a tab character anywhere in my CS code.