I had one fall off in the middle of winter and went to pepboys and bought a kit designed to fix such a thing. it uses a liquid silver solder and was < $25
It fell off the window after using the kit (prob due to the cold weather =/ )so I took it to the dealer. It was < $100 to fix the window and it was winter and I needed to see so I went ahead and did it there.
Been almost a year since the dealer fixed it and its been fine since.
heres a site that has it for $28 but look around at a parts store and see what you can find

_________________
2008 Xterra 4x4
1986 CJ7Lots of custom stuff...
Gone, But not Forgotten...
2003 Sport - 'Fire Engine' RedDetours KJ Backbone
Skids
Boulder Bars
JBA 4.5 A Arms
245/75/16 Wrangler Duratracs's on Cragar Soft 8’s
Spidertrax 1.25" Spacers
Superwinch LP 8500
Frankenlifted