I am quite keen to use this widget in my blog. This script will search for keywords in the content of my blog without having to switch pages.

However, I was thinking what if I add a search feature with a GET method. For example, by visiting `domain.com/page-search.php?search=keyword` instantly get the appropriate content.

I have tried to replace the `type: "POST"` to `type: "GET"` in the script, but to no avail. If I use jQuery auto submit `$("test").Submit();` it works, but will switch to move the page. So I consider how it still failed.

I hope my question is clear. This is an example of my script using AJAX <http://britha.com/iklan/cari.php?search=murah>

Thank you ..

```
<script type="text/javascript">
$(function() {
    $(".search_button").click(function() {
        var searchString    = $("#search_box").val();
        var data            = 'search='+ searchString;
        if(searchString) {
            $.ajax({
                type: "POST",
                url: "searchResult.php",
                data: data,
                beforeSend: function(html) {
                    $("#results").html(''); 
                    $(".mySearch").html(searchString);
               },
               success: function(html){
                    $("#results").show();
                    $("#results").append(html);
              }
            });    
        }
        return false;
    });
});
</script>

<div id="container">
<div id="box_cari">
<form id="test" method="post" action="searchResult.php">
    <input type="text" name="search" id="search_box" class='search_box'/>
    <input type="submit" value="SEARCH" class="search_button" /><br />
</form>
</div>      
<div>

<div id="results"></div>

</div>
</div>

```

**UPDATE**

I have found a solution to this problem.
I change this code:

```
$(".search_button").click(function() {

```

Being:

```
<?php
if(isset($_GET['search'])) {

    $osearch = $_GET['search'];

echo "var control = $(document).ready";
}
else {
echo "var control = $('.search_button').click";
}
?>
control(function() {

```

AND add value is in the search:

```
<input type="text" name="search" id="search_box" class='search_box' value="<?php echo htmlentities($osearch, ENT_QUOTES, 'UTF-8'); ?>"/>

```