Script Function - fatsecret.setCanvas(canvas, parameters)

Description

Sets the current canvas to the specified canvas.

Parameters

Required

Name Type Description
canvas String The name of the canvas to load.

Optional

Name Type Description
parameters JSON data Any optional parameters for the canvas (refer to the Optional setCanvas Parameters section for the canvas in the Canvas reference)

Example

Setting the calendar.get_month canvas as the starting canvas.
<script src="https://platform.fatsecret.com/js?key=XXXXX"></script>

<script>
fatsecret.setCanvas("calendar.get_month");
</script>
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Support
API

About FatSecret

© 2022 FatSecret. All rights reserved.