Search found 320 matches

by Dirk Geppert
Wed Nov 15, 2017 2:36 pm
Forum: Coding Questions
Topic: TextGadget () - enable Scrollbars
Replies: 9
Views: 8792

Re: TextGadget () - enable Scrollbars

Thx again Peter!

But, if the text gadget lays on a panel gadget, it unfortunately doesn't work.


Enumeration
#PANELGADGET
#TEXTGADGET
EndEnumeration

Procedure EnableScrollBars (GadgetID.i)
! $(spider_GadgetID(v_gadgetid).div).parent().css("overflow", "auto");
EndProcedure

OpenWindow(0, 10 ...
by Dirk Geppert
Tue Nov 14, 2017 3:13 pm
Forum: Coding Questions
Topic: TextGadget () - enable Scrollbars
Replies: 9
Views: 8792

Re: TextGadget () - enable Scrollbars

Thx, Peter.

How do I do it with constants or included inside an procedure?


Enumeration
#TEXTGADGET
EndEnumeration

Procedure EnableScrollBars (GadgetID.i)
! $(spider_GadgetID(GadgetID).div).parent().css("overflow", "auto");
EndProcedure

OpenWindow(0, 10, 10, 500, 90, "Html-Preview ...
by Dirk Geppert
Tue Nov 14, 2017 1:18 pm
Forum: Coding Questions
Topic: TextGadget () - enable Scrollbars
Replies: 9
Views: 8792

TextGadget () - enable Scrollbars

How to add the style = "overflow: auto" to the TextGadget()?

I like to use it for html preview. How can I add the style or is there a better suituable gadget?


OpenWindow(0, 10, 10, 500, 90, "Html-Preview")
TextGadget(0, 10, 10, 480, 30, "<html><h3>it works</h3><p>Scrollbars would be nice</p><p ...
by Dirk Geppert
Fri Nov 10, 2017 9:57 am
Forum: Feature Requests and Wishlists
Topic: StringGadget () EventTypes
Replies: 2
Views: 6508

Re: StringGadget () EventTypes

Thanks Peter!
by Dirk Geppert
Thu Nov 09, 2017 12:01 pm
Forum: Feature Requests and Wishlists
Topic: StringGadget () EventTypes
Replies: 2
Views: 6508

StringGadget () EventTypes

Hello Fred,

to finish an input in StringGadegt by pressing Enter, it would be nice if this would also support #PB_EventType_ReturnKey.

Ciao Dirk
by Dirk Geppert
Fri Oct 27, 2017 4:43 pm
Forum: Showcase
Topic: WebSocket Chatclient
Replies: 1
Views: 8369

WebSocket Chatclient

I hope its a good start for someone, to dig into the websocket technology.

For this example, you'll need the WebSocket_Server from Dadido3.
http://www.purebasic.fr/english/viewtopic.php?f=12&t=61606

You can download the source from here: https://github.com/Dadido3/WebSocket_Server/archive/master ...
by Dirk Geppert
Fri Oct 27, 2017 12:52 pm
Forum: Coding Questions
Topic: Cookies and SessionIds
Replies: 11
Views: 14910

Re: Cookies and SessionIds

To more clarify the problem. SpiderBasic will receive a "Set-Cookie" in the reply header from the server.

Set-Cookie PHPSESSID=e613aa6e7742f3148d43c4fd6eff64ba; expires=Fri, 03-Nov-2017 12:20:52 GMT; path=/


This should then be sent within the next request like this:

Cookie PHPSESSID ...
by Dirk Geppert
Wed Oct 25, 2017 6:45 pm
Forum: Coding Questions
Topic: Cookies and SessionIds
Replies: 11
Views: 14910

Re: Cookies and SessionIds

Hi Falsam, thanks for your help. Set a own Cookie works as expected, but reading the cookie, that comes from the server seems not readable.

But thats not the main problem.

I‘ll use an api. The first http request is the login. It works. The server sends success. In the response header I can see a ...
by Dirk Geppert
Wed Oct 25, 2017 11:20 am
Forum: Coding Questions
Topic: Cookies and SessionIds
Replies: 11
Views: 14910

Re: Cookies and SessionIds

Found some Cookie stuff in the german forum
http://www.purebasic.fr/german/viewtopic.php?f=33&t=30172&p=340763&hilit=Cookie#p340763
and tried this:


Procedure.s getCookie(cname.s)
! var name = v_cname + "=";
! var ca = document.cookie.split(';');
! for(var i = 0; i < ca.length; i++) {
! var c ...
by Dirk Geppert
Wed Oct 25, 2017 10:36 am
Forum: Coding Questions
Topic: Cookies and SessionIds
Replies: 11
Views: 14910

Cookies and SessionIds

Hello everyone,

I need help with handling cookies and session IDs.

After a successful login httpRequest, I see in the header that a session ID is sent as a cookie from the server.

Cookie PHPSESSID=0781d6ea840acd7c52186fd916a76705


How can I use this SesssionID for the next httpRequest?

Kind ...