CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Access Element Values in Editable Grid

Print topic Send  topic

Author Message
pkrawetz

Posts: 77
Posted: 03/05/2009, 5:56 AM

I have made several attempts to get the value of an element in an editable grid but have been unsuccessful. I have read and coded the suggestion in post 60507 (from Nicole) but nothing works. No matter how I code the logic, I keep getting the error undefined. I have clipped my code and it's listed below. What am I missing?

function Shift_Passwords(){
initACCOUNTSElements();
for(var j = 0; j < ACCOUNTSElements.length; j++){
alert (ACCOUNTSElements[j][ACCOUNTSPRACCT_PWD_NM3ID].Value);
ACCOUNTSElements[j][ACCOUNTSPRACCT_PWD_NM3ID].Value = ACCOUNTSElements[j][ACCOUNTSPRACCT_PWD_NM2ID].Value;
ACCOUNTSElements[j][ACCOUNTSPRACCT_PWD_NM2ID].Value = ACCOUNTSElements[j][ACCOUNTSPRACCT_PWD_NM1ID].Value;
ACCOUNTSElements[j][ACCOUNTSPRACCT_PWD_NM1ID].Value = ACCOUNTSElements[j][ACCOUNTSACCT_PWD_NMID].Value;
ACCOUNTSElements[j][ACCOUNTSACCT_PWD_NMID].Value = "";
ACCOUNTSElements[0][ACCOUNTSACCT_PWD_NMID].Focus();
}
}

The page resolves with the following:
<td><label for="ACCOUNTSPRACCT_PWD_NM1_1" style="display: none;">PRACCT PWD NM1</label><input id="ACCOUNTSPRACCT_PWD_NM1_1" readonly maxlength="100" size="12" value="" name="PRACCT_PWD_NM1_1"></td>
<td><label for="ACCOUNTSPRACCT_PWD_NM2_1" style="display: none;">PRACCT PWD NM2</label><input id="ACCOUNTSPRACCT_PWD_NM2_1" readonly maxlength="100" size="12" value="" name="PRACCT_PWD_NM2_1"></td>
<td><label for="ACCOUNTSPRACCT_PWD_NM3_1" style="display: none;">PRACCT PWD NM3</label><input id="ACCOUNTSPRACCT_PWD_NM3_1" readonly maxlength="100" size="12" value="" name="PRACCT_PWD_NM3_1"></td>
View profile  Send private message
pkrawetz

Posts: 77
Posted: 03/12/2009, 5:01 AM

Could someone please review this and tell me what I am doing wrong?

Even when I code:
alert (ACCOUNTSElements[0][PRACCT_PWD_NM1ID].Value);
or
alert (ACCOUNTSElements[0][PRACCT_PWD_NM1].Value);
it returns undefined in the message box.

What am I doing wrong? I have the function Shift_Passwords() defined between the <head> and </head> html section as Nicole's forum entry suggests. When I display the array, all I see is [object],[object],[object].... repeated about 9 times. I assumes it one for each element.

Any suggestions would be greatly appreciated!
View profile  Send private message
Oper


Posts: 1195
Posted: 03/12/2009, 4:11 PM

The ID of teh element on a Editable Grid are Dinamic.

its like obj.obj.obj_RowNumber

Check The ID name on the HTML

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
pkrawetz

Posts: 77
Posted: 03/13/2009, 5:09 AM

Based on the 60507 post by Nicole, it does not substitute the ID for a value so I was just following that suggestion.

Please provide examples for your suggestion and explain why it would be different from the 60507 post.
View profile  Send private message
Oper


Posts: 1195
Posted: 03/13/2009, 7:46 AM

ASP right? i do a quick sample
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
pkrawetz

Posts: 77
Posted: 03/13/2009, 8:32 AM

javascript is what I have coded this in.
View profile  Send private message
Oper


Posts: 1195
Posted: 03/13/2009, 9:13 AM

ASP serverside and HTML Client Side. right?
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
pkrawetz

Posts: 77
Posted: 03/13/2009, 9:41 AM

Yes, that is correct.
View profile  Send private message
Oper


Posts: 1195
Posted: 03/13/2009, 9:58 AM

Sample Link and Download:
http://www.informatica.com.do/download.asp?cid=64
y
http://www.ccstalk.com/ccsdemo/EditableGridSample/


var objdiv,idLN;
idLN=document.getElementById('TestFormLN').value;
objdiv=document.getElementById('musicMusicTitle_' + idLN);
alert(objdiv.value);
result=false;

Let me know if that what you were looking for if not please shoot me :-)
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
pkrawetz

Posts: 77
Posted: 03/13/2009, 3:45 PM

This is what I ended doing based on your suggestion. I think someone needs to republish a topic which coincides with this solution. Seems the old one just doesn't work. Thank you again for your suggestion.

initACCOUNTSElements();
var objPRACCTPWDNM3,objPRACCTPWDNM2,objPRACCTPWDNM1,objPRACCTPWDNM1,objACCTPWDNM,objLN;
for(var j = 0; j < ACCOUNTSElements.length; j++){
objLN = j + 1;
objPRACCTPWDNM3=document.getElementById 'ACCOUNTSPRACCT_PWD_NM3_' + objLN);
objPRACCTPWDNM2=document.getElementById('ACCOUNTSPRACCT_PWD_NM2_' + objLN);
objPRACCTPWDNM1=document.getElementById('ACCOUNTSPRACCT_PWD_NM1_' + objLN);
objACCTPWDNM=document.getElementById('ACCOUNTSACCT_PWD_NM_' + objLN);
objPRACCTPWDNM3.value = objPRACCTPWDNM2.value;
objPRACCTPWDNM2.value = objPRACCTPWDNM1.value;
objPRACCTPWDNM1.value = objACCTPWDNM.value;
objACCTPWDNM.value = "";
}
View profile  Send private message
Oper


Posts: 1195
Posted: 03/13/2009, 4:22 PM

yes that the one

also you could go with just one line
  
objPRACCTPWDNM3.value=document.getElementById 'ACCOUNTSPRACCT_PWD_NM2_' + objLN).value;

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
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.