code_junkie

Dynamically loading multiple JS scripts where scripts are all described identically

Nov 13th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. var obj = new namespace.MyObjectName("key", [12, 11, 22, 33, 454, 552, 222], [33, 22, 33, 11, 22, 222, 111]);
  2.  
  3. namespace.MyObjectName = function(keyName, data1, data2) {
  4. this.myData1 = data1;
  5. this.myData2 = data2;
  6.  
  7. this.holder = [
  8. [keyName, [myData1, myData2]]
  9. ];
  10. };
  11.  
  12. namespace.MyObjectName.prototype.DoSomething = function(arg1, argArray) {
  13. this.globalVar = [
  14. "Display " + arg1 + " into string using " + argArray[0] + "<br> for visual purposes",
  15.  
  16. "Display " + arg1 + " into string using " + argArray[2] + "<br> for visual purposes"
  17. ];
  18. };
  19.  
  20. var namespace = namespace || function() {}
Add Comment
Please, Sign In to add comment