Php脚本在Chrome上表现不同,与IE和FF相反

I have a php script that returns posts from tumblr. The posts are determined by a number. The number is incremented by 1 every time I hit the go button on my website. This seems t work perfectly in Firefox and Internet explorer but not chrome.

My code:

My index.php file.

<?php
     session_start();
     $_SESSION['views'] = 0;
 ?>
 <?php include 'blogFunction.php';?>

 <script type="text/javascript">
 function doSomething()
 {
    $.ajax({ url: '/blogFunction.php',
     data: {action: 'test'},
     type: 'post',
     success: function(output) {
     document.getElementById("blog").innerHTML = '';
              document.getElementById("blog").innerHTML = output;
                 }
   });
  }
 </script>

 <div class ="blog" id = "blog"></div>

my blogFunction.php

function blogreturn(){  
    $request_url = "http://retrovate.tumblr.com/api/read?type=posts";
    $xml = simplexml_load_file($request_url);


    $a = $_SESSION['views'];
    $b = $a+4;
    echo "A = ".$a;
    echo "B = ".$b;
    $_SESSION['views'] = $_SESSION['views']+ 1;
    for ($i = $a; $i <= $b; $i=$i+1) {
            echo '<h2>'.$xml->posts->post[$i]->{'regular-title'}.'</h2>';
            echo '<br>';
            echo $xml->posts->post[$i]->{'regular-body'};
            echo '<br>';
            echo '<br>';
    }    
}

My website can be foundhere to test.

The website should also print the values of A and B under the 'Go' Button.

Any idea why it doesn't work in chrome. Thanks in advance!