CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 AJAX prototype-1.4.0.js and editable grid

Print topic Send  topic

Author Message
bburnett

Posts: 22
Posted: 04/23/2007, 3:01 PM

I have an editable grid that has CCS listbox onchange events that use AJAX to update other listboxes. That's running well. Problem is when I call the jscript code below at onSubmit it does its thing but then I get an error: "Line: 0
Error: 'ptrkActualsElements[...].0.value' is null or not an object" (after the for loop has completed).

initptrkActualsElements();
var ED = document.forms["ptrkActuals"];
for ( theRow in ptrkActualsElements ){
if ((ptrkActualsElements[theRow][0].value=="") && (ptrkActualsElements[theRow][1].value=="")){
ptrkActualsElements[theRow][3].value="";
ptrkActualsElements[theRow][9][0].checked=false;
}
}

It's like this code is being run twice once by CCS (correctly) and a second time by Prototype? They both have event listeners. Anyone ever used AJAX and an editable grid? Any ideas? Thanks
_________________
Brandon Burnett
New Media Architect
REL Productions
West Des Moines, IA, USA
www.relonline.com
View profile  Send private message
CCT


Posts: 44
Posted: 04/24/2007, 3:00 AM

Actually, prototype overrides default JS Hash object and makes:
for (item in hash) { ... }
construction unusable. It's stated in prototype API docs. You should use "hash.each" method instead (this method is part of prototype extensions to Hash).
_________________
Get more CodeCharge Studio builders at http://codechargetools.com
View profile  Send private message
bburnett

Posts: 22
Posted: 04/24/2007, 7:56 AM

Thanks

While I didn't get the hash.each to work; I switched it to
for (i=0; i<ptrkActualsElements.length; i++) {
and that solved the problem.
_________________
Brandon Burnett
New Media Architect
REL Productions
West Des Moines, IA, USA
www.relonline.com
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 http://support.yessoftware.com.

MS Access to Web

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

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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