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

 CCS/PHP and xAjax-function problem

Print topic Send  topic

Author Message
NilovSerge

Posts: 16
Posted: 11/26/2006, 1:30 AM

Hallo!
In my CCS/PHP app I try before deleting of a row(Button_OnDelete_OnClick) verify if it is referenced
using xAjax library:
function Button_OnDelete_OnClick () {
...

xajax_ifCanDeleteRow( id, type );
// it means that in server php-function xajax_ifCanDeleteRow I verified if I can delete row
I set isCanDeleteRow equels 'Y' using method $objResponse->addAssign( 'isCanDeleteRow', "value", 'Y' );

...
var isCanDeleteRow= document.getElementById( "isCanDeleteRow" ).value;


if ( isCanDeleteRow== 'N' ) return;

return confirm('Delete Row?');


Problem is that in this case isCanDeleteRow(hidden input actually) does not see change in xajax_ifCanDeleteRow



In my prior php/JavaScript apps I made verification before deleting of a row like so:


function isCanDeleteDoc() { // called by "Delete" button
var cn;
cn= Trim(document.getElementById( "cn" ).value);
xajax_iscandeleterow( "LOV", cn ); // call server ajax-function if doc can be deleted
} // function isCanDeleteDoc() {

and if in xajax_iscandeleterow I verified that row can be deleted I run JavaScript with confirmation
and deleting of a row


function run_deleterow(cn) { // if server function "xajax_iscandeleterow" didn\'t found any restrictions then it calls
if ( !confirm("'.$DeletingCap.' ?") ) return false; // run_deleterow(cn) to confirm deletion of a doc
xajax_deleterow( "LOV", cn ); // call sever function to delete that doc
}

And that works fine as I can separate all routine in several JavaScipt/PHP functions!
And it is not working in CCS/PHP as all deleting routine is made in event function Button_OnDelete_OnClick.
What can I do here?
Maybe there is a better way to do verification?

_________________
With respect,
Nilov Serge.
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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