Webgadget: External Resources (css,images,etc)

Linux specific forum
majk
New User
New User
Posts: 6
Joined: Wed Jun 07, 2006 2:48 pm

Webgadget: External Resources (css,images,etc)

Post by majk »

Hi Team,

any external resource i reference within HTML will not be loaded within a linux webgadget.

Code: Select all

<img src="templates/myimage.png"> 
<link rel="stylesheet" href="templates/config_header.css" 
BTW: No difference between absolute and relative path -> allway the same effekt. The resource doesnt load.

The same technic work under Windows very well.

Here a full PB Source for example:

Code: Select all

Enumeration
  #window
EndEnumeration

Enumeration
  #webgadget
EndEnumeration 

Define anf.s
Define webcontent.s

anf.s = Chr(34)


If OpenWindow(#window,0,0,800,600,"Test")

  CompilerSelect #PB_Compiler_Version
    CompilerCase 430
      If UseGadgetList(WindowID(#window))
    CompilerCase 420
      If CreateGadgetList(WindowID(#window))
  CompilerEndSelect    
  
   WebGadget(#webgadget,0,0,800,600,"")
   EndIf

EndIf

; 



webcontent = "<html><head></head><body>test<img src="
webcontent + anf + "file:///media/UDISK%202.0/Portable%20Source/newsBEAR%20Redesigned/templates/default/fugue/balloon.png" + anf
webcontent + "></body></html>"

Debug webcontent

; THIS DOES NOT WORK
SetGadgetItemText(#webgadget,#PB_Web_HtmlCode,webcontent)

; THIS WORK
;SetGadgetText(#webgadget,"file:///media/UDISK%202.0/Portable%20Source/newsBEAR%20Redesigned/templates/default/fugue/balloon.png")

;  Event
Repeat 
  WaitWindowEvent()
  Delay(10)
Until 1=2