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.

[error]
Line: 37
Char: 5
Error: Expected identifier, string or number
Code: 0
[/error]

[code]
<html>
<head>
<title>f1</title>
<script type="text/javascript">
if (!window.XMLHttpRequest) {
  window.XMLHttpRequest = function() {
    return new ActiveXObject('Microsoft.XMLHTTP');
  }
}
</script>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
var cdInterval=0;
var cdTime=cdInterval+1;
 function changeCart(cartname) {
  alert(cartname);
  document.getElementById("cartname").innerHTML = cartname;
  //setTimeout("ajaxlastcall()",500);
 }

function ajaxlastcall() {
    url = "http://devmachineurl/sid.htm?
sid=6680&prg=menu&frame=lastcall";
    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)
              document.getElementById("lct").innerHTML=lastcall;
          else startit(interval,lastcall);
        },
        onException: function(response) {
            alert("Failed" + response.responseText);
        },
    });
}

</script>
</head>
<body>
<div id="cartname">Please select a cart.</div>
<input type="hidden" id="toggleval" name="toggleval" value="yes">
</body>
</html>
[/code]

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to