FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



Ever wanted to call a javascript client...Expand / Collapse
Message
Posted 1/9/2007 6:12:56 AMPost #1006
 

c360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expert
Ever wanted to call a javascript client function after all records are processed by an ActionPage?

Use the javascript code below in your action page.
And set the ClientSideSaveSuccessHandler in the ActionPage code to "SaveSuccess"



function SaveSuccess(result, objecttype, objectid)
{
       
//alert(result + ';' + objecttype + ';' + objectid); 
        //
       
// TODO: check/count if all records were processed?
        //

        // call javascript method in opener after all records are processed
        // _currentRecord and _recordCount are set by c360 in the ActionPage

        if (_currentRecord == _recordCount - 1)
        {

                // _opener is set c360 in the ActionPage

               if (_opener && _opener.test)

               {

                _opener.test();

               }

       }

       return "";
};




NOTE
The test method should be declared in the javascript of the ASP.NET page that executed/openend the action page!!

@Jeremie
I get the impression that the objecttypecode parameter passed to the "SaveSuccessHandler" is set with the index in of the selected record in the grid....shouldn't this be the objecttype? ("0" as ObjectType in ActionPage.SaveData  revisited?)
Posted 1/9/2007 9:46:15 AMPost #1007
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
Ever wanted to call a javascript client function after all records are processed by an ActionPage?

Use the javascript code below in your action page.
And set the ClientSideSaveSuccessHandler in the ActionPage code to "SaveSuccess"

Excellent tip! Thanks for sharing.

I get the impression that the objecttypecode parameter passed to the "SaveSuccessHandler" is set with the index in of the selected record in the grid....shouldn't this be the objecttype? ("0" as ObjectType in ActionPage.SaveData  revisited?)

You are correct, this is very similar to defect number DE1010 which you had discovered and we fixed in version 3.0.7.

I have reported this new problem as defect number DE1523. However, since it may already be too late for the January 23 release. I will try to convince our dev team to fix this defect but I can't guarantee.

 

« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: kanika.jackson, Ken Champion

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 10:30am

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.172. 9 queries. Compression Enabled.