Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# swilliam 6/21/2006 7:51 AM (edited 6/21/2006 7:53 AM)
Hi there

I've written a module that is installed on my local version of Cuyahoga, and is also installed on a server. Both share the same Cuyahoga database and have exactly the same code and pages. The cuyahoga site is set to use the server URL as its default, with the local version accessed using an alias.

When running locally, everything seems to work OK; however, when run on a server postback events don't work. (I'm using the 'Another Red' template here.)

The local page renders the following snippets for Firefox 1.5:
form name="__aspnetForm" method="post" action="/Cuyahoga/Checkout.aspx" id="__aspnetForm"

function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.__aspnetForm;
}
else {
theform = document.forms["__aspnetForm"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}

The server version is rendered thusly: (note this is from a virtual directory as well)
form name="p:t" method="post" action="/Igentics/Checkout.aspx" id="p_t"

function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["p:t"];
}
else {
theform = document.p:t;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}

Note here the id of the form is completely different. ASP.NET appears to use the name rather than the id attribute value and causes a javascript error in the __doPostBack() function.

*** theform = document.p:t; ***

I think the page engine attempts to rename the ids of controls but I'm not sure if this is what is causing the error.

Does anyone have any suggestions?

Many thanks

Simon
# martijnb 6/22/2006 4:04 AM
Simon, it appears that your Server installation doesn't have .NET 1.1 SP1 installed. Originally .NET 1.1 had a bug in this area.
# swilliam 6/22/2006 7:31 AM
Thanks. That seems to have fixed it.