Dhtml and lame webgadget fix wish

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Dhtml and lame webgadget fix wish

Post 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???
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post 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:
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Dhtml and lame webgadget fix wish

Post 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. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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!
@}--`--,-- A rose by any other name ..
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post 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! :)
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post 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. :?:
naw
Enthusiast
Enthusiast
Posts: 573
Joined: Fri Apr 25, 2003 4:57 pm

Post 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...
Ta - N
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post 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.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

There are no plans for this from our side, sorry.
quidquid Latine dictum sit altum videtur
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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.
@}--`--,-- A rose by any other name ..
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post 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). :)
porfirio
Enthusiast
Enthusiast
Posts: 111
Joined: Mon Nov 15, 2004 11:00 pm
Location: portugal

Post 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?
Forgive-me for my english, i'm portuguese!
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

> It would be very usseful making pb communicate with js :d

badaboom: ;)
viewtopic.php?p=104594#104594
quidquid Latine dictum sit altum videtur
porfirio
Enthusiast
Enthusiast
Posts: 111
Joined: Mon Nov 15, 2004 11:00 pm
Location: portugal

Post 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:
Forgive-me for my english, i'm portuguese!
Post Reply