Title of the browser's tab

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
Angelo
Posts: 15
Joined: Tue Jul 14, 2015 9:14 am

Title of the browser's tab

Post by Angelo »

So far, the "title line" in the html-file is always

Code: Select all

<title>SpiderBasic</title>
and it can only be changed by opening and changing the html-file itself.
It would be nice if the developer could change the title via SB-code. My suggestion:

Code: Select all

SetTitle("my title")
sworteu
Posts: 18
Joined: Sun Feb 07, 2016 9:49 am

Re: Title of the browser's tab

Post by sworteu »

Angelo wrote:So far, the "title line" in the html-file is always

Code: Select all

<title>SpiderBasic</title>
and it can only be changed by opening and changing the html-file itself.
It would be nice if the developer could change the title via SB-code. My suggestion:

Code: Select all

SetTitle("my title")

Code: Select all

Procedure SetTitle( Title.s )
! document.title = v_title;
EndProcedure
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Title of the browser's tab

Post by Peter »

sworteu wrote:

Code: Select all

Procedure SetTitle( Title.s )
! document.title = v_title;
EndProcedure
but for the duration of loading the page (until setting the title with the code above), "SpiderBasic" appears as title.

It's better when the compiler modifies the Title-Tag in the HTML-File.

Greetings ... Peter
Post Reply