javajunky
17 Jan 2007, 4:28 AM
I'm sure this is a simple question, but I'm puzzled as to what I should be doing with regards to code seperation, I could write everything as one big js file that was brought into a single page, is this the correct approach. To recap say I've an application that has multiple 'tabs' in the center region , where each tab has the responsibility to for doinging someting (its an admin console for want of a better word).
I'm happy in the understanding that I can create these tabs, by constructing an iframe with the src attribute set to be the url of a specific server page that populates a full html document, or I can create it with a div that just populates it with content. However with the former, I can't write Javascript that knows about my top level YUI-Ext 'application object [the object passed to YAHOO.ext.EventManager.onDocumentReady] and with the latter, I can't embed javascript that I can then use in this new tab, do I have to give the top level object knowledge of the whole application (i.e. use the JSBuilder app to create the mega-js file) ?
I'm sorry if this doesn't make total sense, but I can't find any examples [barring the feed viewer] where people have split out an app into different 'files' , where those files are different server side files, or javascript files :(
edit: I'm sorry this should've been posted in the help forms, not this forum, could someone please move it for me ! :(
I'm happy in the understanding that I can create these tabs, by constructing an iframe with the src attribute set to be the url of a specific server page that populates a full html document, or I can create it with a div that just populates it with content. However with the former, I can't write Javascript that knows about my top level YUI-Ext 'application object [the object passed to YAHOO.ext.EventManager.onDocumentReady] and with the latter, I can't embed javascript that I can then use in this new tab, do I have to give the top level object knowledge of the whole application (i.e. use the JSBuilder app to create the mega-js file) ?
I'm sorry if this doesn't make total sense, but I can't find any examples [barring the feed viewer] where people have split out an app into different 'files' , where those files are different server side files, or javascript files :(
edit: I'm sorry this should've been posted in the help forms, not this forum, could someone please move it for me ! :(