I am using xhrGet to send data to the server. It works great in firefox but in internet explorer there is a problem. Internet explorer has a character limit of how many characters you can send which is 1700. I was wondering if anybody had any ideas on any work arounds.
dojo.xhrGet
dojo.xhrGet error in IE7
I have a 'save' feature to save the current diagram in the drawing canvas to a file. Here's the code:
// save the current diagram to a svg file or text file.
save= function(){
dojo.xhrGet({
url: 'save.jsp',
preventCache: true,
load: saveCallback,
error: saveError,
content: {name: dojo.byId('output').value }
});
};
It works fine in FF, but I get the error(using Visual Web Developer 2005 as IE debugger) in IE7:
Microsoft JScript runtime error: Object doesn't support this property or method.
XHR retrive data and apply parent page js
I am trying for couple of days to use
dojo.xhrGet({
url: "MyUrl.php",
handleAs: "text",
load: function(data){
dojo.byId("MyDiv").innerHTML = data;
}
});
}
I receive the content nicely, but the form element I have inside "MyUrl.php" do not get stylize like the rest of the page why?
(e.g <input type="text" name="name" id="name" size="20" dojoType="dijit.form.TextBox" required="true"> it will show a regualer textbox and not stylize)
dojo.xhrGet and local XML files in Mozilla
I am trying to use dojo.xhrGet to load an XML file when all my pages are loaded from the local filesystem (not on a server). The file contains valid XML but does not have an XML extension (let's say it's xml_data.dat).
Because it's a local file, no http headers are used to set the content/mime type as it looks like Mozilla (Firefox 2 and Seamonkey) is trying to guess the mime type by file extension. That fails and I only get a responseText in the xhr.
I got around it by using XMLHttpRequest.overrideMimeType() method available in Mozilla browsers.
- Login or register to post comments
- Read more
- Unsubscribe post
Combobox auto complete using AJAX
Hi
I am trying to create an auto complete combobox that fetches data from the DB2 database when theuser focuses on it. I want to make a lazy load of options using dojo.Xhrpost().
I tried the combo box with the store and works fine if I create a datastore at the time of load. But if I create this datastore at the time of focus on the combobox and then get the data using ajax , the options in the combo box are not refreshed. Is there a way around this ?
Thanks in advance for the help.
- Login or register to post comments
- Unsubscribe post
url can not be built at the event?
Why does the following DO work?
var rw = {
url: "/cgi-bin/glaw.exe/pefi?idenfi=3",
handleAs: "json",
timeout: 5000,
load: function(response, ioArgs) {
console.log(response);
handleResult(response);
},
error: function(response, ioArgs) {
console.log("Error Occured");
}
};but the following does NOT?
var rw = {
url: "/cgi-bin/glaw.exe/pefi?idenfi="+dojo.byId('buidenfi').value,
Problem with xhrGet
From an html file I call a function named "getById(id)" in a .js script:
dojo.addOnLoad(function() {
var id = 33;
var data=getById(id);
console.log("data0: "+ data);
});
</script>
The function in the .js script looks like this:
function getById(id)
{
d= "{\"type\":\"byId\",\"data\":\"" + id + "\"}";
console.debug("getById: "+ id);
var call=
{
url: 'php/control.php',
handleAs:'json',
content: d,
sync: true,
load: function (response,ioArgs) {
console.log("data1: "+response);
<Solved>dojo1.0 dojo.xhrGet
I am new to Dojo. I am trying to get JSON data from server. Here I have written code
var series=dojo.xhrGet({
url: "actions/seriesBuilder.jsp",
handleAs: "json",
timeout: 5000,
load: function(response, ioArgs) {
console.log(response);
return response;
},
error: function(response, ioArgs) {
console.log("Error Occured");
}
});
