Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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...

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

Posted

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....

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

Posted
Here's the html source generated

test.txt

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

Posted

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.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...