Hi Fellow Developers!

Let me explain you my problem with a simple example:

I have 3 files. Index.html, script.js, ajax.php. The contents of these files are as follows:

index.html
Code:
<html>
<head>
<script src="jquery.js"></script>
<script src="script.js"></script>
<script>
   function addition(exp){
       
     alert( eval(exp) );

   }
</script>
</head>

<body>

</body>

</html

script.js
Code:
            $.ajax({
                url :  'ajax.php',
                dataType: 'script',
                type: 'post',
                success: function(data){

                 addition(data);

                }
            });

ajax.php
Code:
echo "5+10";
die;
What I want is based on the output of ajax.php file, the addition function should alert the number 15.

Can someone pls tell me what am I missing in above code?

Thanks