Hello,
we recently discovered that the content of the WebForm_InitCallback method, supplied via webresources differ from each other on different machines.
The only difference on the machines we could figure out is that one has SP1 installed and the other one has not ( Windows Server 2008 R2).
The .net framework versions are the same aswell as the IIS versions.
On the one without SP1 there is no variable "__callbackTextTypes" but that variable can be found on the other one.
I am wondering who is responsible for that/where does the script gets generated?
Any help would be highly appreciated.
Windows Server 2008 R2 with SP1
var __callbackTextTypes = /^(text|password|hidden|search|tel|url|email|number|range|color|datetime|date|month|week|time|datetime-local)$/i; function WebForm_InitCallback() { var formElements = theForm.elements, count = formElements.length, element; for (var i = 0; i < count; i++) { element = formElements[i]; var tagName = element.tagName.toLowerCase(); if (tagName == "input") { var type = element.type; if ((__callbackTextTypes.test(type) || ((type == "checkbox" || type == "radio") && element.checked))&& (element.id != "__EVENTVALIDATION")) { WebForm_InitCallbackAddField(element.name, element.value); } } else if (tagName == "select") { var selectCount = element.options.length; for (var j = 0; j < selectCount; j++) { var selectChild = element.options[j]; if (selectChild.selected == true) { WebForm_InitCallbackAddField(element.name, element.value); } } } else if (tagName == "textarea") { WebForm_InitCallbackAddField(element.name, element.value); } } }
Windows Server 2008 R2 without SP1
function WebForm_InitCallback() { var count = theForm.elements.length; var element; for (var i = 0; i < count; i++) { element = theForm.elements[i]; var tagName = element.tagName.toLowerCase(); if (tagName == "input") { var type = element.type; if ((type == "text" || type == "hidden" || type == "password" || ((type == "checkbox" || type == "radio") && element.checked)) && (element.id != "__EVENTVALIDATION")) { WebForm_InitCallbackAddField(element.name, element.value); } } else if (tagName == "select") { var selectCount = element.options.length; for (var j = 0; j < selectCount; j++) { var selectChild = element.options[j]; if (selectChild.selected == true) { WebForm_InitCallbackAddField(element.name, element.value); } } } else if (tagName == "textarea") { WebForm_InitCallbackAddField(element.name, element.value); } } }