JS runtime error in doPostBack with control:control form ID

M

Matt Petteys

I'm using 1.1 framework and IE 6.0. A form within a user control
generates the following doPostBack method. The control ID of the form
is not a valid javascript variable name, ie
UserProjectDataEntry1:EnterPeriodTime. When the page is loaded, I get a
runtime error when it parses the following line.

theform = document.UserProjectDataEntry1:EnterPeriodTime;

This used to work on the 1.0 framework. Any ideas?

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top