deleted-user-yA_w_FC9FKe5

Using a button to call my functionality from another file

Discussion created by deleted-user-yA_w_FC9FKe5 on Apr 15, 2014
Latest reply on Apr 15, 2014 by deleted-user-yA_w_FC9FKe5
I used this sample as the basis for what I need to do.   Jake Skinner helped me with that and it is greatly appreciated.

So what I want to do now is I want to take the big chunk of code that makes it work and call it from a module or another js file so that my main html file does not become 500 pages long with code.  Kind of like calling a css file like this.

<link rel="stylesheet" type="text/css" href="myWidgets/Buffer_Customers/buffer_customers.css" />

I looked at the dijit stuff and that just looks very confusing.  Is their not a simplier way to call the code when needed for the button?
 
Please see the code below for where I am now. 

http://jsfiddle.net/UjK29/

Any help would be greatly appreciated.  I'm sure their is an easy way to do this I just don't understand this stuff enough to do it myself regardless of how much google searching I do.

Outcomes