Microsoft KB Archive/266023

= PRJ2000: Script Error or Browser Error When You Create New Task in Microsoft Project Central =

Article ID: 266023

Article Last Modified on 1/27/2007

-

APPLIES TO


 * Microsoft Project 2000 Standard Edition

-



This article was previously published under Q266023



SYMPTOMS
In Microsoft Project Central, when you click New Task in either the Timesheet view or the Actions pane, the Create Task button is unavailable, and the Make the new task a subtask of list box is empty. In addition, you may receive one of the following error messages.

Message 1
A Runtime Error has occurred.

Do you wish to Debug?

Line:

Error: Expected ')'.

Message 2
Problems with this Web page might prevent it from being displayed properly or functioning properly. In the future, you can display this message by double-clicking the warning icon displayed in the status bar.

Line:

Char:

Error: Expected ')'

Code: 0

URL: http://servername/projectcentral/tasks/newtaskspage.asp?_ID=



CAUSE
This problem occurs when one or more of the summary tasks listed in the Timesheet view has an apostrophe in its name.



WORKAROUND
To work around this problem, use one of the following methods.

Method 1: Remove the Apostrophe from the Summary Task Name
Edit the summary task name so that it no longer contains an apostrophe, and then resend all messages for the subtasks of that summary task. To do this, follow these steps:
 * 1) In Microsoft Project 2000, open the project that contains the summary task that has the apostrophe in its name.
 * 2) Edit the summary task name to remove the apostrophe.
 * 3) On the File menu, click Save.
 * 4) Select the summary task and all of its subtasks.
 * 5) On the Tools menu, point to Workgroup, and then click Resend All Messages.
 * 6) In the TeamResendAll dialog box, click Send.

Method 2: Modify the Script That Displays the New Task Page
Modify the Active Server Pages (ASP) script that displays the New Task page in Microsoft Project Central. To do this, follow these steps:  Make a backup copy of the NewTaskPage.asp script, and store the backup copy in a different folder than the original.

NOTE: The NewTaskPage.asp script is located on the Microsoft Project Central server, in the Tasks subfolder of the Project Central folder. The default path is C:\ProjectCentral\Tasks\NewTaskPage.asp. On the Microsoft Project Central computer, start Microsoft Notepad. (Click Start, point to Programs, point to Accessories, and then click Notepad.) In Microsoft Notepad, click Open on the File menu. In the Open dialog box, click All Files in the Files of type list. In the Look in list, locate and open the original NewTaskPage.asp file from the location that is described in step 1. On the Edit menu (in Microsoft Windows 2000) or the Search menu (in Microsoft Windows NT 4, Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition [Me]), click Find.</li> In the Find what box, type Response.write(&quot;aSubTasks .</li>  Click Find Next. The text should be found at the beginning of a line which reads as follows: Response.write(&quot;aSubTasks[&quot;+i+&quot;] = new FieldElem (&quot;+rsSubTasks.GetColumn(const_dbWPROJ_ID)+&quot;,&quot; +rsSubTasks.GetColumn(const_dbWASSN_ID)+&quot;,'&quot; +rsSubTasks.GetColumn(const_dbTASK_NAME)+&quot;');\n&quot;); NOTE: The above line should appear as one continuous line, not on several lines as shown above. If it does not appear as one continuous line, then click to remove the check mark from Word Wrap on the Edit menu. </li> Click Cancel to close the Find dialog box.</li> Select the entire line in which the text was found, and then click Copy on the Edit menu.</li>  At the beginning of the line that you just copied, type //.

NOTE: If you type two slash marks at the beginning of a line, the line changes to a comment that is not run, but is still preserved for future reference.

The edited line should read as follows: //Response.write(&quot;aSubTasks[&quot;+i+&quot;] = new FieldElem (&quot;+rsSubTasks.GetColumn(const_dbWPROJ_ID)+&quot;,&quot; +rsSubTasks.GetColumn(const_dbWASSN_ID)+&quot;,'&quot; +rsSubTasks.GetColumn(const_dbTASK_NAME)+&quot;');\n&quot;); </li> Click at the beginning of the line immediately below the line that you just edited, and then press ENTER to insert a new blank line.</li> Click to place the insertion point in the new blank line, and then click Paste on the Edit menu.</li>  Edit the line that you just pasted to read as follows: Response.write(&quot;aSubTasks[&quot;+i+&quot;] = new FieldElem (&quot;+rsSubTasks.GetColumn(const_dbWPROJ_ID)+&quot;,&quot; +rsSubTasks.GetColumn(const_dbWASSN_ID)+&quot;,'&quot; +escape(rsSubTasks.GetColumn(const_dbTASK_NAME))+&quot;');\n&quot;); NOTE: The edited line must be a continuous line with no inserted line breaks. </li> On the Edit menu (in Windows 2000) or the Search menu (in Windows NT 4, Windows 95, Windows 98, or Windows Me), click Find.</li> In the Find what box, type oOption.text = aSubTasks .</li>  Click Find Next. The text should be found at the beginning of a line which reads as follows: oOption.text = aSubTasks[i].nFieldName; </li> Click Cancel to close the Find dialog box.</li> Select the entire line in which the text was found, and then click Copy on the Edit menu.</li>  At the beginning of the line that you just copied, type //. The edited line should read as follows: //oOption.text = aSubTasks[i].nFieldName; </li> Click at the beginning of the line immediately below the line that you just edited, and then press ENTER to insert a new blank line.</li> Click to place the insertion point in the new blank line, and then click Paste on the Edit menu.</li> <li> Edit the line that you just pasted to read as follows: oOption.text = unescape(aSubTasks[i].nFieldName); NOTE: The edited line must be a continuous line with no inserted line breaks. </li> <li>On the File menu, click Save.</li> <li>On the File menu, click Exit.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Keywords: kbbug kbpending KB266023

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.