Test script

It's alive!

well, it works, at least. Thanks to HN for the help.

If you still want to give me grief over anything feel free - this page will disappear in a short while now.


See that? Nothing happened.

So here's the thing. I have inherited a web page that has some javascript on it. In that page you enter some values, click on a button, a function gets called, and the results get displayed.

At least, that's what used to happen. It doesn't work any more, and I have no idea why. I don't have a dev environment, I don't know how the DOM works and interacts with javascript, and it's impossible to search for stuff when it just doesn't work, and there's no error message.

So here's a cut down version of what's supposed to happen.

I've got a script with a function called "display". There are two "input" fields, one is a button, the other is just a place to put the resulting test after calling the function. The function gets called when the button gets clicked, and the results should get displayed.

Nothing seems to happen.

You can give me as much grief as you like, but I'd really, really like someone to explain why this doesn't seem to do anything, and what a minimal change would be to print the text somewhere.

Consider this to be in the spirit of the way Tim Ferriss learns a new language[0]. He takes some specific example sentences, gets them translated, then analyses the heck out of the the result. This is like that. I need to understand what's happening here, and this simple, most likely inelegant, almost certainly bad-style example will teach me a lot.

Oh yes, I promise I won't get into a long, protracted, drawn-out and seemingly never ending discussion about this with you. It won't be an endless time sink. If you like you can limit me to some specific number of emails, or you can hand me a conceptual token in each of your emails, giving or denying me permission to reply. Whatever, I promise I won't be a leech.

Thanks.

[0] Tim Ferriss on learning/deconstructing a language's grammar

Here's a "mailto:" link for a quick reply.

Alternatively, here's a form so you can reply directly, and you don't even need to give a return address.

 


Thank you!