It is currently Fri Nov 24, 2017 3:46 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: WebGadget; SPA; communication App -> WebGadget; PB5.6x
PostPosted: Fri Aug 18, 2017 6:04 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 417
Hello!

What ways do we have to start communicating between PureBasic program and embedded WebGadget.
This must be done using a SPA (singe page application).
So, simply writing a whole new web page is not a good idea;-)

At the moment, I use windows title and #PB_EventType_TitleChange which works from embedded browser to PureBasic.
The step back is handled via file system and JS observing folder.
The file observing is what makes me want another technic.

Maybe WScript/CScript and network?

Btw., ActiveX in internet explorer is possible/I may use!

I need this for offline app which later communicates to web server when connection available again.


Really apreciate any idea!
Thanks a lot!
Regards!


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget; SPA; communication App -> WebGadget; PB5.6x
PostPosted: Mon Aug 21, 2017 4:10 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1366
Hi HanPBF,

I know we discussed it here and here, but it seems that you are only using the document.title one way; see either of the following posts for a working solution.
- MP4 Player, YouTube Player (search for _Put_ and _Get_)

This is the second time I am posting a response; the last time was in one of your other threads, since removed.
- sorry if you missed it, but I have a policy to delete posts that go unanswered

_________________
ImageMy PureBasic Stuff


Last edited by JHPJHP on Wed Aug 23, 2017 9:05 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget; SPA; communication App -> WebGadget; PB5.6x
PostPosted: Mon Aug 21, 2017 7:25 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 417
Yes, did indeed overread it but can remember the hint to the interface IHTMLDocument2.

Thanks for making it clear again!
That helps a lot!

So, two-way communication with WebGadget via document.title possible!
Great!


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget; SPA; communication App -> WebGadget; PB5.6x
PostPosted: Tue Aug 22, 2017 2:43 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5688
Location: Wales, UK
Code:
WebBrowser2\put_Silent(#True)

I use this code myself because so many websites have Java Script errors but it is worth noting that it is not specifically for this purpose - it actually suppresses all dialogue boxes, so that includes those that deliver info such as extended hints.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget; SPA; communication App -> WebGadget; PB5.6x
PostPosted: Fri Aug 25, 2017 4:44 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 09, 2010 3:47 am
Posts: 1366
Hi HanPBF,

See MP4 Player for additional code that might be of interest...

Dynamically create multiple <article> elements using JavaScript (tested with 100MB of data per element).
- the <pagetitle> tag is used to notify PureBasic that data is ready

PureBasic is then used to retrieve data from each of the <article> elements into a single file.

_________________
ImageMy PureBasic Stuff


Last edited by JHPJHP on Mon Aug 28, 2017 5:25 am, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: WebGadget; SPA; communication App -> WebGadget; PB5.6x
PostPosted: Sat Aug 26, 2017 11:32 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 417
Really apreciate that example!

I have now IIS with classic ASP (only serving JSON from AJAX/J requests) and are later able to re-embed JS/HTML/CSS into PureBasic.

Then, we have SpiderBasic; so, developing for intranet, embedded or not, can easily be done with one code base for the GUI.

Can not imagine if JS/HTML/DOM could be too slow to manage those things; mandelbrot set graphics would be an example where speed shall be distinct.


Thanks a lot for the source!
Best regards!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye