John,
I'm not sure if these are iFrames, or if it matters in this context, but I'm assuming you mean a javascript client-side variable and not a server-side session variable?
Anyway, what I've done is use a function, say the variable is foo (global), I have a function getfoo(), which just returns foo from the other frame, with:
newvariable = parent.frames.otherframe.window.getfoo()
--Jim