i want to see how i can do ajax calling javascript from php file

what i mean by that is that once you submit the form, it sends the information to the php file, but then i want to use some other javascript code but for some reason when i put the javascript code in the php file i dont see it, it doesnt work

i tried using the eval() function - but i am not sure i am doing it righ

my Ajax question : can you explain why the responseText return a javascript code but browser can't run it when i submit the form

please help!!