make value of a function global to be called in any other function
<p>hello i want to pass the value of a function to any other function or make the value of a function global so that it can be called in any other function . but i dnt knw how to do it , tried some codes still no sucess . </p>

<p>here is the function code </p>

<pre><code>function newalbum(val1,loginuser)
{

$.ajax({
type:"GET",
url: 'ajax/album.php?val='+val1+'&amp;&amp; loguser='+loginuser,
success: function(data) {
$("#newalbum1").html(data);
        var ab=$('#ab').val();
        var abc=$('#loginuser').val();
        var action=$('#action').val();

alert(ab);
}
});
}
</code></pre>

<p>in this function i want to make the three variables var ab, var abc, var action to be global so that its value can be used in any other function . can any one help?</p>

<p>edit - the value of var ab, var abc, and var action is comming from ajax data that is why i am not able to use those variable directly , it says undefined if i use it directly.</p>

<p>after the varibales value received from ajax in function newalbum . i want to use those   varibales inside             </p>

<pre><code> (function( $ ){
 $.fn.Uploadrr = function( options ) {
</code></pre>
