HeaderSection/EndHeaderSection

Just starting out? Need help? Post your questions and find answers here.
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

HeaderSection/EndHeaderSection

Post by Stefan »

What can I do with this? Can anyone gib an example?
User avatar
useful
Posts: 135
Joined: Tue Feb 25, 2014 1:15 pm

Re: HeaderSection/EndHeaderSection

Post by useful »

viewtopic.php?p=11203#p11203
<!DOCTYPE html>
<html>
<head>
!!! --- !!! <<<----|
</head>
<body>
<p> ... HTML5</p>
</body>
</html>
2B or not 2B = FF
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: HeaderSection/EndHeaderSection

Post by Peter »

Is your <F1> key broken? ;)

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()
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: HeaderSection/EndHeaderSection

Post by Stefan »

I don't have to understand it either :D
Thank you :)
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: HeaderSection/EndHeaderSection

Post by Peter »

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.
How can we help you?
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: HeaderSection/EndHeaderSection

Post by Stefan »

I don't quite understand the point yet.
Can I change the design with it, or can I perhaps disable the browser from using the cache? That would be great.
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: HeaderSection/EndHeaderSection

Post by Peter »

Stefan wrote: Tue Aug 05, 2025 3:11 pm[...] or can I perhaps disable the browser from using the cache?
untested:

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
Stefan
Posts: 248
Joined: Mon Feb 05, 2018 9:44 pm

Re: HeaderSection/EndHeaderSection

Post by Stefan »

At least Spider doesn't get stuck :D
I'll give it a try, thanks :)
Post Reply