views:

56

answers:

0
function get_radio_value()
{
   for (var i=0; i < document.fm1.gp1.length; i++)
   {
      if (document.fm1.gp1[i].checked)
      {
         var rad_val = document.fm1.gp1[i].value;
         if(rad_val == "Last Name"){
            get_radio_value.url = "rpc.php";
         }

       }
    } 
 }

then outside the scope you can call

alert( get_radio_value.url);

basically all you need to do is call the function name dot variable like this get_radio_value.url insdead of using the static keyword. Would this be a good substiute for static?