Strange bug with framework 1.1

ultraman

Centurion
Joined
Dec 31, 1969
Messages
138
Location
Quebec, Canada
I just downloaded and installed framework 1.1 (previously on 1.0 SP2) and a very strange thing happened : I suddenly had an javascript error on almost all my pages. I just discovered that the doPostBack function spitted by the .NET is not the same in this version. It tests the browser type to see if it's "netscape".

This seems to be a problem for my IE browser, caus' I now always get an error on line 27 char 28 said "; expected". It may be one of my own script too, but it works perfectly with the 1.0 version :-(

Anyone has an idea on how to get rid of this ?
For now, I just rolled back to my 1.0 and everyting is working fine, but I need to figure out what's the problem because if my client installs the 1.1 version, my app won't work anymore...
 
Tried it, it's not the problem. My problem is that my pages inherits from a BasePage that has a control that includes the Form.... Am I clear enough ? Anyway, the script generated by the framework shoots this :
Visual Basic:
script language="javascript">
<!--
	function __doPostBack(eventTarget, eventArgument) {
		var theform;
		if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
			theform = document.forms["Conteneur:Form1"];
		}
		else {
			theform = document.Conteneur:Form1;
		}
		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
		theform.__EVENTARGUMENT.value = eventArgument;
		theform.submit();
	}
// -->
</script>
Where "Conteneur" is the control located in the base page and Form1 is the form located in that control.

From what I understand, it seems to be the Else line that cause problems.

theform = document.Conteneur:Form1;

In a normal page, this is just : theform = document.Form1;

Oh, and when I save the source in .html after having remove this function, I can open it in IE whithout errors, so that part is the problem I guess, but I will then have to change the whole programming structure....
 
This is a known bug in the framework. Microsoft has issued no fix for it, although various developers offer workarounds. Search Google for their unsupported patches and suggestions.
 
Thanks Derek, this way I won't spend the rest of the week wondering if I was right or wrong in my diagnostic.

I'll give it a try on Google and I'll let everyone know if I find something that really worth it. Because from my point of view, it's one of the simpliest ways to implement templates by inheritage and MS should just fix this MAJOR bug.
 
Back
Top