[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gb.web webpage, pass javascript value to the class?


On Mon, 15 Dec 2025 at 22:37, Bruce Steers <bsteers4@xxxxxxxxx> wrote:

>
>
> On Mon, 15 Dec 2025 at 18:53, Lee <t.lee.davidson@xxxxxxxxx> wrote:
>
>> On 12/15/25 10:32 AM, Bruce Steers wrote:
>> > Is it possibleto pass a Javascript from a Main.webpage file to the
>> Main.class?
>> >
>> > Or is it possible to get the webpage Javascript info in the class?
>> >
>> > I want to do something like this in Main.webpage...
>> > <DOCTYPE html>
>> > <head>
>> > <script>
>> > let sOrigin = location.origin;
>> > </script>
>> > </head>
>> > <%
>> > Init(sOrigin)
>> > %>
>> >
>> > Or if that's not possible is it possible to get location.origin in
>> Main.class?
>> >
>> > Thanks
>> > Respects
>> > BruceS
>> >
>>
>> Couldn't you concatenate the relevant CGI environment values. eg.
>> Init(CGI["REQUEST_SCHEME"] & "://" & CGI["SERVER_NAME"])
>> ?
>>
>>
>> --
>> Lee
>
>
> I guess i could,  so i shall :)  thanks Lee :)
> Respects
> BruceS
>

Hmm actually that's no good. it gives the url the cgi script is at not the
page loading it.
I'm currently trying this..
  If Request.Referer then Return Request.Referer
  If Application.Env["HTTP_ORIGIN"] Then Return
Application.Env["HTTP_ORIGIN"] &/ CGI["SCRIPT_NAME"]
  If Application.Env["AccessControlAllowOrigin"] Then Return
Application.Env["AccessControlAllowOrigin"] &/ CGI["SCRIPT_NAME"]

Oh what joy.
Respects
BruceS

References:
gb.web webpage, pass javascript value to the class?Bruce Steers <bsteers4@xxxxxxxxx>
Re: gb.web webpage, pass javascript value to the class?Lee <t.lee.davidson@xxxxxxxxx>
Re: gb.web webpage, pass javascript value to the class?Bruce Steers <bsteers4@xxxxxxxxx>