Link to #PB_LocalStorage (?)
Posted: Mon Feb 05, 2024 12:16 pm
				
				How to get a link to the find.htm file
If I use "./data/find.htm" then that doesn't work either.
			Code: Select all
Procedure SaveCallback(Status, Filename$, id_file, Size)
	Select Status
		Case #PB_Status_Saved
			Debug 1
		Case #PB_Status_Error
			Debug 0
	EndSelect
EndProcedure
#Window = 0
#WebG = 0
ww = 1000
hh = 600
If OpenWindow(#Window, 0, 0, ww, hh, "", #PB_Window_Background)
	WebGadget(#WebG, 0, 35, ww, hh - 35, "")
EndIf
	
	
g_id_file = CreateFile(#PB_Any, "find.htm", @SaveCallback(), #PB_LocalStorage | #PB_UTF8)
If g_id_file
	For i = 1 To 5
		WriteStringN(g_id_file, Str(i), #PB_UTF8)
	Next
	CloseFile(g_id_file)
	SetGadgetText(#WebG, "find.htm")
; 	SetGadgetText(#WebG, "http://127.0.0.1:9080/find.htm") ; ?
EndIf