The way I see it, the stock exchange is a market where shares of a company are traded. These trades are triggered by individual valuations by participants of what an investment in a company would be worth. I mean, the participants think like this, don't they?:
I expect the company to distribute 'X' as dividends for the next few years. So if I invest 'A' amount now, the dividends could help me recover my 'A' over a period of time. Hopefully, there would be other people around after a few years who'd think that the company would start distributing 'X + Y' amount as dividends. So they'd then make their valuations and be willing to pay a nice price to buy a share which I'd then gladly accept and pocket a handsome profit.
How exactly would a terrorist attack make people value the returns from a company less and less (if that's what a drop in the stock price implies)? And that too the shares of almost all companies by majority of the investors/traders? I just don't get the intuition.