I'm not really sure what you're trying to do here...

if you want a JS variable to persist between pages you'll have to pass it in
a cookie, or as part of a query string and then retrieve it on the load of
the second page. It's probably easier to do this server-side.


Jon

2009/9/9 Matt Wilson <m...@tplus1.com>

>
> I have a page /a that has a line
>
> var aaa = 99;
>
> And I load that page /a into a div on another page.  In the other
> page, I want access to that variable aaa.  I tried this:
>
> $("#adiv").load("/a", function () { console.log(aaa); })
>
> I get an error that aaa is undefined.
>
> What am I doing wrong?

Reply via email to