Hi, I'm a total n00b when it comes to AJAX and Prototype.  I do have
an example that works in IE7+, FF and Chrome, but not IE6.  I'm
getting the following JS error when I include the function in my test
page.  I tried including the XMLHttpRequest section thinking that
might be part of my problem, but it doesn't make a difference.  Any
suggestions are welcome.

Line: 37
Char: 5
Error: Expected identifier, string or number
Code: 0

<script type="text/javascript">
if (!window.XMLHttpRequest) {
  window.XMLHttpRequest = function() {
    return new ActiveXObject('Microsoft.XMLHTTP');
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
var cdInterval=0;
var cdTime=cdInterval+1;
 function changeCart(cartname) {
  document.getElementById("cartname").innerHTML = cartname;

function ajaxlastcall() {
    url = "http://devmachineurl/sid.htm?
    new Ajax.Request(url, {
        onSuccess: function(response) {
          var data =
response.responseXML.getElementsByTagName( 'LastCallData' );
          for( var i = 0; i < data.length; i++ ) {
              var interval = data[i].getAttribute( 'interval' ) - 0;
              var lastcall = data[i].getAttribute( 'lastcall' );
          if (interval == 0)
          else startit(interval,lastcall);
        onException: function(response) {
            alert("Failed" + response.responseText);

<div id="cartname">Please select a cart.</div>
<input type="hidden" id="toggleval" name="toggleval" value="yes">

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to