Page 1 of 1

Dhtml and lame webgadget fix wish

Posted: Thu Aug 11, 2005 10:31 am
by utopiomania
I've asked this before but won't give up quite yet. I would like to use for example
dhtml scripts to build parts of the user interface in some cases, but desperately needs
a before nav event, and a cancel nav command added to the browser in order to catch
events(links) from the scripts.

Is it possible at all to add this to the built in browser ?? In case you wonder what
I'm talking about, check out www.dhteumeuleu.com and the IMAGES demo's 'he knew' and
'not in vein' for example.

These are simple text scripts, and there are tons of them on the net which can be used
to build fantastic interfaces if you need to with a minimum of effort. Sparkies fix to
this problem doesn't work, and PB's browser is too limited and half baked as it is now.

:) Please???

Posted: Thu Aug 18, 2005 11:10 pm
by utopiomania
Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Yes! This one. Any chance of an answer ?? :wink:

Re: Dhtml and lame webgadget fix wish

Posted: Thu Aug 18, 2005 11:22 pm
by PB
> Is it possible at all to add this to the built in browser ??

The built-in browser uses the IE engine, so if IE supports it, then I assume
the WebGadget should support it? But I Am Not A Webmaster. ;)

Posted: Fri Aug 19, 2005 1:25 am
by Dare2
Hi PB,

The browser can handle it, but the interface or communication between PureBasic and the webgadget's browser is limited. So you can't easily, for example, have the user click a button or link and then have the program act on that.

Which is what I think utopiamania is requesting?

If so, then I back the request. I have also wanted to do this, to make a quick and dirty WYSIWYG html editor. I have a good-ish one online. But I could not get it working locally within the webgadget.

This would be great! Think of the user front ends you could put on your apps!

Posted: Fri Aug 19, 2005 2:02 am
by utopiomania

Code: Select all

<Body BgColor=White Text=#a0a0ff Link=#a0a0ff VLink=#a0a0ff ALink=red Scroll=Auto>
<B><A Href='ExitProg'>[ Exit ]</A>
<A Href='ProgHome'>[ Home ]</A>
<A Href='OpenFile'>[ Open ]</A>
<A Href='FirstFile'>[ |&lt ]</A>
<A Href='SkipPrev'>[ &lt&lt ]</A>
<A Href='PrevFile'>[ &lt ]</A>
<A Href='NextFile'>[ &gt ]</A>
<A Href='SkipNext'>[ &gt&gt ]</A>
<A Href='LastFile'>[ &gt| ]</A>
<A Href='FitToWidth'>[ W ]</A>
<A Href='FitToHeight'>[ H ]</A>
<A Href='NormalSize'>[ 1:1 ]</A>
 File:[<Font Color=red>KELLY FAMILY - ROSES OF RED.MP3</Font>]</B><Center>
<Embed Src="C:\My Shared Folder\Kelly Family\Kelly Family - Roses of Red.mp3" Width='100%' Height='96%' playcount=1000></Embed></Body>
Thanks PB and Dare2! The above is a rclick/view source copy of the UI of an app I'am running right now,
and which I would like to port to PureBasic, but I do need the tricks requested to do so! :)

Posted: Sun Aug 21, 2005 10:54 pm
by utopiomania
Well, how is it going to be. Will it happen, will it not happen ever, maybe, we're working on it or what ??

I don't post for fun, and since yo invite people to post requests here, I'd like to know. :?:

Posted: Mon Aug 22, 2005 7:39 am
by naw
This would be very cool - I asked for it a while back too.

An interface between the IE based WebGadget & PB to catch / send events would be a great UI solution.

Perhaps a User Library? I'm sure this is a non-trivial request though...

Posted: Mon Aug 22, 2005 12:56 pm
by utopiomania
Yes, it would be cool. For me, it would also mean I could get rid of Ibasic pro and concentrate
entirely on PureBasic instead. As things are now, I'm not shure what to do with some programs and ideas.

Posted: Mon Aug 22, 2005 1:07 pm
by freak
There are no plans for this from our side, sorry.

Posted: Mon Aug 22, 2005 3:32 pm
by Dare2
As a potential solution - I'm too lazy to search for it right now - I think that Sparkie (where are you Sparkie!) wrote something that might be useful along these lines.

But don't quote me, I may be mis-remembering.

Posted: Mon Aug 22, 2005 9:54 pm
by utopiomania
Ok freak, thanks for the answer! At least I can stop waiting and get to work on plan B.

@Dare2, you remember right, Sparkie posted on this. (=Plan B). :)

Posted: Sun Sep 25, 2005 6:02 pm
by porfirio
It would be very usseful making pb communicate with js :d

For exemple pb can communicate with js but cant get nothing returned

in the html page:
function myfunc(t){
alert(t);
}

in pb:
pbvar.s='hello world'
SetGadgetText(#web_0,"javascript:myfunc('"+pbvar+"')")

other thing that can work is
html-js:
function eval_(code){
try{
eval(code)
}
catch(e){
alert('cant eval the code')
}
}

now in pb...
pbvar.s='alert("hello world")'
SetGadgetText(#web_0,"javascript:eval_('"+pbvar+"')")

That work!
But what about geting values from js?
Theres no way :( only if you write a txtfile then pb open it etc...
But then ppl will get a activex dialog

So any ideas of implementation?

Posted: Tue Sep 27, 2005 2:09 am
by freak
> It would be very usseful making pb communicate with js :d

badaboom: ;)
viewtopic.php?p=104594#104594

Posted: Tue Sep 27, 2005 5:47 pm
by porfirio
freak wrote:> It would be very usseful making pb communicate with js :d

badaboom: ;)
viewtopic.php?p=104594#104594
Good job Freak :lol: