views:

150

answers:

1
function getSelectedRadio(seeker_provider) {
  var sign;
  for (var i=0; i<seeker_provider.length; i++) {
    if (seeker_provider[i].checked)
    {
      sign=i;
    }
  }
  if(sign==0)
  {
    alert(sign);
    window.location='updatcty.php';
  }
  if(sign==1)
  {
    alert(sign);
    window.location='../registration_provider.php?proid=2222221 & pagname=select';
  }
  // alert(document.all.seeker_provider.value);
}

I wrote this JavaScript function for getting the selected radio button value and redirect accordingly, but it supports all browsers except Firefox 3.0.6. What can I do?

+1  A: 

Try changing this line:

window.location='../registration_provider.php?proid=2222221 & pagname=select';

to this:

window.location='../registration_provider.php?proid=2222221&amp;pagname=select';
Ian Kemp
Kobi
Ian Kemp
Kobi