HeaderSection/EndHeaderSection
Posted: Mon Aug 04, 2025 1:48 pm
What can I do with this? Can anyone gib an example?
- a basic to master the web -
https://forums.spiderbasic.com/
Code: Select all
#myWindow = 0
#myContainer = 0
HeaderSection
<script src="https://cdn.jsdelivr.net/npm/uplot@1.6.32/dist/uPlot.iife.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/uplot@1.6.32/dist/uPlot.min.css" rel="stylesheet">
EndHeaderSection
Procedure DrawChart()
Protected myContainerGadgetID = GadgetID(#myContainer)
Protected myContainerWidth = GadgetWidth(#myContainer)
Protected myContainerHeight = GadgetHeight(#myContainer)
EnableJS
// Example-Data: X = Time, Y = Values
const data = [
[1546300800, 1546387200, 1546473600, 1546560000], // X-Axis Unix-Timestamps
[20, 30, 25, 35] // Y-Axis Values
];
const options = {
width: v_mycontainerwidth,
height: v_mycontainerheight,
series: [ {}, { label: "Value", stroke: "blue" } ],
axes: [ {}, { label: "Value" } ],
};
const chart = new uPlot(options, data, v_mycontainergadgetid.div);
DisableJS
EndProcedure
OpenWindow(#myWindow, #PB_Ignore, #PB_Ignore, 1000, 500, "uPlot-Example", #PB_Window_ScreenCentered)
ContainerGadget(#myContainer, 10, 10, WindowWidth(#myWindow) - 20, WindowHeight(#myWindow) - 20, #PB_Container_Single) : CloseGadgetList()
DrawChart()
How can we help you?SB-Help" wrote:HeaderSection
Introduction
SpiderBasic allows to easily customize the <header></header> section of the app HTML file. It can be useful when needed to add additional meta tags or to include css or javascript files directly in the HTML.
Commands
Syntax
HeaderSection
Description
Open the header section. All the code put into the HeaderSection will be directly added at the end of the <header></header> section. If a tag already exists in the HTML header, it won't be replaced. EndHeaderSection needs to be called to close the header section. It can have several HeaderSection in the program.
Example
HeaderSection
<meta name="description" content="Customizd description">
<script type="text/javascript" src="https://cdn.babylonjs.com/babylon.js"></script>
EndHeaderSection
Syntax
EndHeaderSection
Description
Close the current header section previously opened with HeaderSection.
untested:Stefan wrote: Tue Aug 05, 2025 3:11 pm[...] or can I perhaps disable the browser from using the cache?
Code: Select all
HeaderSection
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
EndHeaderSection