Problem with getting an onclick event to work with DataPageSize set to All

ze_colmeia

New member
Local time
Today, 11:17
Joined
Oct 3, 2006
Messages
8
Hello.

Im working with DAPs. On one particular DAP i need to have a list of all the emails associated with a PersonId, with the option of adding new records. So i set DataPageSize to All and allow additions and deletions. I also have 2 command buttons: one to Save and other to Add record.

This DAP receives a value from another DAP, and i want to assign that value to the field PersonId when i click on the Save button. This works fine when the DataPageSize is set to 1, but if its set to All it only works the first time.

I have this on the onclick event of the Save button:

Code:
<SCRIPT language=javascript event=onclick for=saveRecord>
try { if (MSODSC.DataPages.Count > 0)
		[B]PersonId.value=parent.Id();[/B]
if (MSODSC.CurrentSection == null)
		MSODSC.DataPages(0).Save();
else
	MSODSC.CurrentSection.DataPage.Save();}
catch (e)
{ alert (e.description);}
</SCRIPT>

On bold is the part i added to the code the Wizard produces.

Any way for getting it to work with several rows?
 

Users who are viewing this thread

Back
Top Bottom