Bug hunting, looking around the box
I just spent way too long trying to figure out what is wrong with this code:
<script type="text4/javascript">
function customerUpdated()
{
//dostuff
}
</script>
<asp:DropDown ID="Customers" runat="server" DataTextField="Name"
OnClientChanged="customerUpdated();" DataValueField="Id"/>
The answer is below... but do try to figure it out
.
.
.
.
.
.
.
.
Can you see the problem? Perhaps this will help:
<script type="text4/javascript">
Argh!!! I must have gone over it a hundred times and didn't see it.
Comments
that's dynamic languages ...
can't live with them , can't without...
Spotted it immediately, but kept looking deeper for a real bug assuming that was just a typo in your blog post.
Saw it right away. That sort of thing happens to me all the time though.
I think these are the kinds of problems pair programming is supposed to solve.
I did like Edward.
Note that it is easier to spot other people's error than our own. The reason is that, when you read your own code, you know what is written, therefore you only look at the important stuff.
Agree with Pierre... but maybe you're spending too many hours on the pc ;)
Spotted it immediately, but it's easy when it's not your code, nor is your neck on the line for getting it to work. Actually it popped out so quickly I thought I must be wrong and that maybe text4/javascript was valid syntax and I was in the dark.
Comment preview