Hi all, I have got jquery ajax working with the following script that doesn't reload the page and outputs a thank you message on form submission.

When the submit button is sent I want it to do activate the php script instead of doing the window. How do I do this? Thank you

PHP Code:
<form id="myForm" action="comment.php" method="post"> 
<p>Convert from:

<select name="FromCurrency">

<option value="USD">UnitedStatesDollar</option>

</select></p>


<p>Convert to:

<select name="ToCurrency">

<option value="CAD">CanadianDollar</option>

</select></p>

<p>Value to convert:<input type="text" name="ValueToConvert" /></p>
    <input type="submit" value="Submit Comment" /> 
</form>


<?php

require_once 'lib/nusoap.php';

$oClient   = new nusoap_client(

    
'http://www.webservicex.net/CurrencyConvertor.asmx?WSDL',

    
TRUE // Needs to be TRUE because we are using WSDL

);

$oResponse $oClient->call(

    
'ConversionRate',

    array( 

        
'FromCurrency' => $_GET['FromCurrency'],

        
'ToCurrency'   => $_GET['ToCurrency']

    )

);


$fConversionRate = (float) $oResponse['ConversionRateResult']; 

$result =  $fConversionRate *  $_GET['ValueToConvert'] ;

echo 
$result

?>




<head> 
    <script type="text/javascript" src="jquery.js"></script> 
    <script type="text/javascript" src="form.js"></script> 
 
    <script type="text/javascript"> 
        // wait for the DOM to be loaded 
        $(document).ready(function() { 
            // bind 'myForm' and provide a simple callback function 
            $('#myForm').ajaxForm(function() { 
                alert("Thank you for your comment!"); 
            }); 
        }); 
    </script> 


</head>