In general, you should never use eval(). AJAX calls should return data, not logic. More specifically echo "$('#status').html('<b>The morse code is : ". $output ."</b>');"; should be more like drupal_json(array('morse' => $output)); And eval(msg); should be more like var response = $.parseJSON(msg); $('#status').html('<b>The morse code is : ' + response.morse + '</b>'); (This is untested code, but should give you the general idea.)

Comments

prathK’s picture

Assigned: Unassigned » prathK
Status: Active » Fixed

Removed the eval function and javascript itself to avoid any ambiguity.
Committed the changes in new version 2.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.