In my airline it is now strictly prohibited for anyone other than the flightcrew to visit the flightdeck. All as a result of Sept. 11. On my last flight we had to turn away a few children.
Personally I do not agree with this new policy. I can't see any harm in a five year old visiting the flightdeck briefly, escorted by the purser.
Adults, No ! but children ?