This suction cup mounting can be made for about $6.00. It consists of a 3" suction cup and the top section of a $5.00 (aprox.) table top tripod. This is perfectly OK for compact cameras but for a larger one I would use three suction cups.
I must not have been thinking when I took the picture, you will feel much more comfortable if you mount it on the inside of the glass.
NOTE: This is just a suggestion for a project. You will take full responsibility for any damage or loss of warranty to your camera or equipment while experimenting and using any or part of the posted suggestions.