Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > JS runtime error in doPostBack with control:control form ID

Reply
Thread Tools

JS runtime error in doPostBack with control:control form ID

 
 
Matt Petteys
Guest
Posts: n/a
 
      08-14-2003

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("n etscape") > -1) {
theform = document.forms["UserProjectDataEntry1:EnterPeriodTime"];
}
else {
theform = document.UserProjectDataEntry1:EnterPeriodTime;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in doPostBack function for Calendar control Koi ASP .Net Web Controls 0 04-12-2005 04:00 PM
doPostBack error tfs ASP .Net 3 06-29-2004 09:03 AM
Dopostback Paging Question jm ASP .Net 0 10-30-2003 04:14 PM
doPostBack client-side function Johno ASP .Net 3 07-21-2003 09:02 AM
calling doPostBack not working Timothy Kelley ASP .Net 1 07-18-2003 01:56 PM



Advertisments