It is not always a good idea to put something in the same enclosure with a cham, as chams are very territorial. It depends on your chameleon, but usually they are willing to attack anything that comes into their personal space, including big ol' scary humans.
It is a risk that you will put your gecko into since chams can be pretty mean. I don't know too much about geckos and I am not sure how a gecko would handle a chameleon, but I do know that chameleons are very territorial. Either sex would not enjoy that situation, but male chams tend to be even more territorial than the females.
In addition, a gecko and a chameleon probably don't have the exact same environmental/spacial/humidity needs, even though I think they are similar. That probably isn't the main concern, though. Just what I mentioned above.