Page 1 of 1
Why does this form not work?
Posted: Mon Nov 16, 2015 4:48 pm
by Kukulkan
Hello,
I try this code using my Kubuntu 14.04 but see the result:
Code: Select all
html.s = "<!doctype html><html lang=\qen\q><head><meta http-equiv=\qcontent-type\q content=\qtext/html; charset=UTF-8\q></head>"+
"<body>" +
"<form action=\qhttps://www.google.com\q method=\qpost\q><br>" +
"<input type=\qtest\q name=\qtxtName\q value=\qenter Name\q><br>" +
"<input type=\qsubmit\q value=\qSubmit\q>" +
"</form>" +
"</body>" +
"</html>"
html.s = ReplaceString(html.s, "\q", Chr(34))
Debug html.s
path.s = GetTemporaryDirectory() + "test.html"
CreateFile(0, path.s)
WriteString(0, html.s)
CloseFile(0)
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "file://" + path.s)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Result:

The form is unusable because of the black background of the input elements. If I open the same HTML in any web-browser it displays correctly.
I use PB 5.24 LTS in x64 mode on Kubuntu 14.04.
What is wrong?
Kukulkan
Re: Why does this form not work?
Posted: Mon Nov 16, 2015 5:01 pm
by Keya
Kukulkan wrote:I use PB 5.24 LTS in x64 mode on Kubuntu 14.04.
i just tried it in 5.31 Linux Mint-32 and the background is regular white. I haven't tried 5.40 or 5.24
Perhaps if you specify the background color does it fix it? it might be best to specify it anyway, i think the following for white:
<body bgcolor="#FFFFFF">
perhaps also check the library (don't ask me how though! lol) ... PB Helpfile - Webgadget:
Linux: The WebGadget uses the WebKitGtk library on Linux. The package with this library is named 'libwebkit'. Some distributions may include an old version of this package which is named 'WebKitGtk'. If your distribution does not include a package for this library, the sources can be downloaded from the WebKitGtk home page (
http://webkitgtk.org/).
Re: Why does this form not work?
Posted: Mon Nov 16, 2015 5:25 pm
by Kukulkan
I tried setting bgcolor on several places and also CSS in form tag and body tag. No change...
This is what dpkg is saying about my libwebkit version. Something wrong here?
Code: Select all
~$ dpkg -l | grep libwebkit
ii libwebkitgtk-1.0-0:amd64 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+
ii libwebkitgtk-1.0-common 2.4.8-1ubuntu1~ubuntu14.04.1 all Web content engine library for GTK+ - data files
ii libwebkitgtk-3.0-0:amd64 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+
ii libwebkitgtk-3.0-common 2.4.8-1ubuntu1~ubuntu14.04.1 all Web content engine library for GTK+ - data files
ii libwebkitgtk-3.0-dev 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+ - development files
ii libwebkitgtk-common-dev 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+ - common development files
Kukulkan
Re: Why does this form not work?
Posted: Mon Nov 16, 2015 5:33 pm
by Keya
i dont know sorry, but here's my Mint32 for comparison:
Code: Select all
~$ dpkg -l | grep libwebkit
ii libwebkit2gtk-3.0-25:i386 2.4.4-1~ubuntu1 i386 WebKit2 API layer for WebKitGTK+
ii libwebkitgtk-1.0-0:i386 2.4.8-1ubuntu1~ubuntu14.04.1 i386 Web content engine library for GTK+
ii libwebkitgtk-1.0-common 2.4.8-1ubuntu1~ubuntu14.04.1 all Web content engine library for GTK+ - data files
ii libwebkitgtk-3.0-0:i386 2.4.4-1~ubuntu1 i386 Web content engine library for GTK+
ii libwebkitgtk-3.0-common 2.4.4-1~ubuntu1 all Web content engine library for GTK+ - data files
ii libwebkitgtk-dev 2.4.8-1ubuntu1~ubuntu14.04.1 i386 Web content engine library for GTK+ - development files
Re: Why does this form not work?
Posted: Tue Nov 17, 2015 7:02 pm
by Oma
Hi Kukulkan.
I tried it on Kubuntu x64 V14.04 on my oldest PB 5.30 (gtk2) to 5.40 (gtk3) and it works fine with white background.
For comparison:
Code: Select all
~$ dpkg -l | grep libwebkit
ii libwebkitgtk-1.0-0:amd64 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+
ii libwebkitgtk-1.0-common 2.4.8-1ubuntu1~ubuntu14.04.1 all Web content engine library for GTK+ - data files
ii libwebkitgtk-3.0-0:amd64 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+
ii libwebkitgtk-3.0-common 2.4.8-1ubuntu1~ubuntu14.04.1 all Web content engine library for GTK+ - data files
ii libwebkitgtk-dev 2.4.8-1ubuntu1~ubuntu14.04.1 amd64 Web content engine library for GTK+ - development files
Maybe your 'theme' make problems.
Regards, Charly
Re: Why does this form not work?
Posted: Wed Nov 18, 2015 8:52 am
by Kukulkan
I switched titles, styles, icons etc. from one to the other with no success at all. The system is quite standard and I did not install or update any specific things. I'll try to reproduce on other systems now...
Ok, it seems like a specific problem on my system. On some other Kubuntu 14.04 it works fine. On some Xubuntu 14.04 it also works.
Thanks all for testing. Sadly, I have no idea about the reason and the libwebkitgtk seems on the good version ( 2.4.8 ).
Any other ideas what might be wrong on my system?
Kind Regards,
Kukulkan