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>


<p>Convert to:

<select name="ToCurrency">

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


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


require_once 'lib/nusoap.php';

$oClient   = new nusoap_client(


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


$oResponse $oClient->call(



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

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



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

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



    <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!");