Hi
I have just started to use this toolkit and I think its really sweet working with.
I have made a function which looks like this:
function toggleAndChangeStyle(targetId,targetId2,classId) {
if (document.getElementById){
var target = document.getElementById( targetId );
var target2 = document.getElementById( targetId2 );
dojo.xhrGet(
{
url: '/servlet/gui',
load: helloCallback,
error: helloError,
content: {groupId:targetId}
}
);
if (target.style.display == "none"){
target.style.display = "";
}
else {
target.style.display = "none";
}
if (target2.className == ""){
target2.className = classId;
}
else {
target2.className = "";
}
}
}This is how I vall the function in the html:
onclick="toggleAndChangeStyle('a','b','c');"
I think the xhrGet is pretty straight forward. IE does not think so..
The ajax message is sent to a java servlet which does some logic, there is also a "system out" that always write to the my console (i'm developing in Eclipse) when the servlet gets the request sent from the function.
This funtion (xhrGet) is called every time a "img" is clicked.
When I try this in Firefox it works like a charm. The servlet is reciving the request like there is no tomorrow and are tracing to the console etc.
When I use IE - it works the first time I click my img and do the ajax call, if I then click the same picture I get nothing in the request?
As if IE is cashing the request??
Thanks in advance!!!
/nirre

solved it ;)
I guess the "preventCache: true" was the answer :)
dojo.xhrGet( { url: '/servlet/gui', load: helloCallback, error: helloError, preventCache: true, content: {groupId:targetId} } );/nirre