CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> Java

 Script error on auto new row

Print topic Send  topic

Author Message

Posts: 3
Posted: 06/29/2008, 5:51 AM

*Newbie* And I'm not sure if this is really a script problem or a problem with my html or php code.

I'm working with an editable grid and would like to incorporate the example Editable Grid with Auto New Rows. I've followed the steps to recreate and I've copied the java script from the example, but when the script runs I get this IE script error (and the new row is not added):

"An error has occurred in the script on this page."
Line: 60
Char: 8
Error: Object required
Code: 0

I've compared my code with the example and cannot see any difference (other than grid name / column name). The grid is wqdetail and the field is wqpcs. Like I said, I'm a newbie, so I don't know where to look for the problem that's causing the error. Here's the script code, with line 60 commented.....and then the html code for wqpcs.....if someone could just point me in the right direction, it'd be much appreciated!

<script language="JavaScript" type="text/javascript">
var needCheck = true;
function ShowNewEmptyRow(thisObj)
var NS6 = (!document.all && document.getElementById) ? 1 : 0;
var IE = (document.all) ? 1 : 0;
var O = typeof(opera) != "undefined";
var i;

var FormState = document.wqdetail.FormState.value.split(";");
var AllLength = parseInt(FormState[0])+parseInt(FormState[1]);
if (needCheck)
for (i=1;i<=FormState[0];i++)
document.getElementById('wqdetailwqpcs'+i).onchange = null;
if (thisObj.onchange == null)
thisObj.onchange = null;

if (parseInt(FormState[0]) == 0 ) {
FormState[0] = 1;

for (i=FormState[0]; i<AllLength; i++) {
var objRow = document.getElementById('row'+i);
if (NS6 || O) {
if ( == "none") { = '';
objRow.LastAttribute == "True";
} else
// THIS IS LINE 60 if ( == "none") { = "block";
objRow.LastAttribute == "True";


wqpcs input looks like (note first field is hidden - does that matter??):

<tr class="Row" id="{RowIDAttribute}" name="{RowNameAttribute}" AddedRow="{AddedRow}" {RowStyleAttribute}>
<td><input type="hidden" name="{wquotenum_Name}" value="{wquotenum}" id="wqdetailwquotenum_{wqdetail:rowNumber}"> </td>
<td><label for="wqdetailwqpcs_{wqdetail:rowNumber}" style="DISPLAY: none">Wqpcs</label><input onchange="ShowNewEmptyRow(this);" id="wqdetailwqpcs_(wqdetail:rowNumber}" maxlength="10" size="10" value="{wqpcs}" name="{wqpcs_Name}"></td>
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.