JS to jQuery to the fullest
<p>I have this:</p>

<pre><code>function createObject() {  
  var request_type;
  var browser = navigator.appName; 
  if(browser == "Microsoft Internet Explorer"){
    request_type = new ActiveXObject("Microsoft.XMLHTTP");
  } else {
    request_type = new XMLHttpRequest();
  }
  return request_type;
}

var http = createObject();
var nocache = 0;

function insert() {
  document.getElementById('insert_response').innerHTML = "To Sek .. "
  var bID= encodeURI(document.getElementById('bID').value);
  var kommentar= encodeURI(document.getElementById('kommentar').value);
  nocache = Math.random();
  http.open('get', 'insert.php?bID='+bID+'&amp;kommentar=' +kommentar+'&amp;nocache = '+nocache);
  http.onreadystatechange = insertReply;
  http.send(null);
}

function insertReply() {
  if(http.readyState == 4){
  var response = http.responseText;  
  document.getElementById('insert_response').innerHTML = response;
  if ($("#box[value=1]").length &gt; 0) {  window.parent.showMessage("Video Is OK"); }
}
}
</code></pre>

<p>And i want to "shorten" the code, and make it use jQuery to the fullest. eg, i have heard of serialize(); instead of using http.open etc.., but how should i use it in this case? </p>

<p>And do i really need all that in createobject() to make the http?</p>
