HWeber
July 23, 2012, 6:52pm
#1
I want to populate the form data of a dhtmlxForm with an asp.net web-service.
In Mozilla this works fine but with Internet Explorer the form is not populated.
Web-service example:
[WebMethod]
public void GetData()
{
Context.Response.Write("<?xml version=\"1.0\"?><data><field1>T E S T</field1></data>");
}
Javascript:
...
formEdit.load(<url> + "GetData");
...
Why form is not populatetd with Internet Explorer?
Darya
July 24, 2012, 9:12am
#2
To reproduce your issue we need completed demo or direct link.
docs.dhtmlx.com/doku.php?id=othe … leted_demo
HWeber
July 25, 2012, 8:36am
#3
Hello,
I’ve attached a zip file with a complete demo.
Complete Demo.zip (1.04 MB)
Andrei
July 27, 2012, 1:44pm
#4
hi
add “var” before variable and use callback for loading values, due async requests, there is a case when “form struct” will responsed after “form data”
var myForm = new dhtmlXForm("myForm");
myForm.loadStruct("xml/form.xml?e="+new Date().getTime(), function(){
myForm.load("xml/data.xml?e="+new Date().getTime());
});
HWeber
July 31, 2012, 8:06am
#5
I’ve tried your solution, but the problem still exists:
The field is not populated with Internet Explorer (9) but with Mozilla.
You can test it:
Loading from file:
http://t03.combi-connect.net/complete%20demo/index_file.html
Loding from web-service:
http://t03.combi-connect.net/complete%20demo/index_ws.html
Andrei
August 1, 2012, 2:16pm
#6
Works with file not works with web service.
Please attach uncompressed dhtmlxform.js (from sources filder) after dhtmlx.js to completed demo.
HWeber
August 5, 2012, 7:40am
#7
So, I’ve put dhtmlform.js after dhtmlx.js:
...
<script type="text/javascript" src="codebase/dhtmlx.js"></script>
<script type="text/javascript" src="codebase/dhtmlform.js"></script>
...
but nothing changed.
HWeber
August 6, 2012, 11:53am
#9
Ok, I’ve corrected the error but nothing changed.
Andrei
August 7, 2012, 12:34pm
#10
Hi
dhtmlx.js file from version 3.0,
dhtmlxform.js from 3.5
please attach corresponding dhtmlxform.js not compressed.
Andrei
August 7, 2012, 12:40pm
#11
also your response not have “Content-Type: text/xml” header, maybe this is problem
HWeber
August 8, 2012, 7:11am
#12
Ok, the problem was that the header doesn’t include ContentType = “text/xml”.
Now it work’s, thanks.