ultraman Posted October 24, 2003 Posted October 24, 2003 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... Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
Moderators Robby Posted October 24, 2003 Moderators Posted October 24, 2003 Why not comment out your own script and see if you get an error or not. (You most likely will not) Quote Visit...Bassic Software
ultraman Posted October 24, 2003 Author Posted October 24, 2003 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 : 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.... Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
ultraman Posted October 24, 2003 Author Posted October 24, 2003 Here's the html source generatedtest.txt Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
*Gurus* Derek Stone Posted October 24, 2003 *Gurus* Posted October 24, 2003 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. Quote Posting Guidelines
ultraman Posted October 26, 2003 Author Posted October 26, 2003 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. Quote Now go on, boy, and pay attention. Because if you do, someday, you may achieve something that we Simpsons have dreamed about for generations: You may outsmart someone! --Homer Simpson
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.