0

i'm trying to call a javascript function after form submit and having any error then i want this script to run but this code is not working.I'm new in PHP Please help

 if(!empty($varAccountType))
{
<?php  
  if($varAccountType=='Free Account')
   {  
     echo "inside $varAccountType";  //this line is working
     echo '<script type="text/javascript">OnSelectionAcctType(Free Account);</script>';  
  //only this is not calling//
   } 
?>} 

please help.. Thanks in Advance

1 Answers1

0

can you try by passing like below

echo '<script type="text/javascript">OnSelectionAcctType("Free Account");</script>';