[Javascript] Optimization problem

Dan Costea costea.dan at ssi-schaefer.ro
Fri May 24 18:39:42 CDT 2002


    Hi,

I work with IE5.5 (the application is just for internal use, so no cross browser needed). 
I have an application: the user opens an IE page, connect to the webserver, logs in and main page with a tree is opened. From here he can open some other pages. I have a lot of js code that I load on almost every frame of every page. The most users have the browser set "Check for newer ver. every time visit the page". The js code is most than 300KB, so if the page has 5 frames, 1.5MB of js are sent from the webserver  to the client. So, I want to make an optimization: to load the js code just on the top of the main page and than initialize a variable on every frame: top.main = opener.top. So, now, for calling a function I use: main.functionName (...); it works, BUT, my problem is: how to work in the function caller context? For example, if I use document.all['lala'] in the function, it will search for 'lala' object from top of the main; I want to search in the frame from where the function was called. Can anybody tell me how to do that? 

I would really appreciate any help, any idea. 

Thank you, Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020524/21012440/attachment.htm>


More information about the Javascript mailing list