Home
Developers

Developers

  • Documentation
    • Developer Guide
    • API Reference
    • Style Guide
    • How-To
    • Troubleshooting
  • Submit a Flake
  • Support

Pageflakes How-To and Troubleshooting Guide

  • Manage Flake Instances
  • Server-Side Scripting
  • Auto-Save Settings
  • Storing an Array into a Profile
  • Using CSS
  • Access Web Services from Flakes
  • Flake Development Tools
  • Troubleshooting
Home » Documentation » How-To

Storing an Array into a Profile

JavaScript arrays cannot be stored directly into an instance; they must be converted into strings prior to storing. This example clarifies this procedure:

var myarray = new Array("sample1", "sample2", "sample2", "sample4");
var arrayToString = myarray.join("|");
fso.profiles['data'] = arrayToString;
fso.save();

To retrieve the array from the instance and use its previously-saved state, use the following code:

var arrayToString = fso.Profiles['data'];
var myarray = arrayToString.split("|");
‹ Auto-Save SettingsupUsing CSS ›
»
  • Printer-friendly version
  • Add new comment