I have a question on using the DOM method - But first let me describe what I am doing.
1. I create on all my forms a generic <div id='scratchPad' > </div>
2. I reuse the scratch pad to display various results, such as searches, browse, about and other intermediate result sets in various formats. Therefore objects like the buttons "Next" and "Prev" do not always exist in the DOM.
Question then, Am I just hogging memory in the browser by creating these objects even if I don't use them? Or can I even create them at all, if they do not exists until dynamically created when needed?
1. I create on all my forms a generic <div id='scratchPad' > </div>
2. I reuse the scratch pad to display various results, such as searches, browse, about and other intermediate result sets in various formats. Therefore objects like the buttons "Next" and "Prev" do not always exist in the DOM.
Question then, Am I just hogging memory in the browser by creating these objects even if I don't use them? Or can I even create them at all, if they do not exists until dynamically created when needed?



Comment