2 Replies Latest reply on Nov 2, 2010 10:23 AM by Jason San Jose

    saving search history in shareobject

    madhooper Level 1

      I'm trying to save the users search into a share object. I'd like to add the latest search to the shared object and return that array of searches to populate a combo box.

       

      Here's my existing code. This code currently returns the last search but I really need to return at least the last 10 results.                  

       

       

       

                             private function initVinSearchHistoryObject():void{

      vinHistoryObject = SharedObject.getLocal("vinSearchHistory");

      if (vinHistoryObject.size > 0)

      vinSearchField.textInput.text = vinHistoryObject.data.searches;

       

      }

       

      private function saveVinSearchHistory(event:MouseEvent):void{

      vinHistoryObject.data.searches = vinSearchField.textInput.text;

      vinHistoryObject.flush();

      }

       

      Thanks in advance for your assistance.