I made a quick standalone page and it seems to work fine.  Form submit
throws an alert then PHP echo's whatever you enter in the field.  It
looks I have issues elsewhere in my code?

Here's the standalone page code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
dir="ltr">
        <head>
                <meta http-equiv="Content-Type" content="text/html; 
charset=utf=8">
                <title></title>
        </head>
        <body>


<form id="form_search" method="post">
        <label for="search">Search:</label>
        <input id="search" name="search_field" type="text">
        <input id="btnSearch" name="search_button" type="submit" value="Go">
</form>


<?php
if($_POST['search_button']){
        echo $_POST['search_field'];
}
?>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/
libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
$('#form_search').bind('submit', function() {
        alert('form sumitted');
});
</script>


        </body>
</html>

Reply via email to