[Gambas-user] More Webrowser questions re hyperlinks

richard terry rterry at ...1822...
Tue Mar 11 21:54:11 CET 2008


On Mon, 10 Mar 2008 08:25:36 pm Jaap Cramer wrote:
> The webbrowser Link Event contains a variable Path. When I tried something
> similar (for a dictionary) I added an prefix so the Event could look what
> kind of action was needed
>
> An link looks like [a href='MED://data']Prostatism[/a]

Couldn't get this to work, I'm using khtml and the html seems to need the < 
bracket. (Admittedly it was very late at night and with not alot of time.)

like     <a href=       >prostatism</a>
>
> SUB WebBrowser_Link(Path as String)

Also it errors out on the Path as string  saying 'bad event handler, too many 
arguments).

Having said that I"ve kinda got something on the way - I really want to embed 
a key from one of the fields in  my progress notes table (pk_problem) which 
I'll then use to link to all episodes for that particular problem, so I've 
done a string replace of part of the path with str$(pk_problem), which I can 
then extract when the webbrowsernotes_link() is activated.

I'll keep fiddling, and report back, but any other comments welcome. 


Richard

>   dim prefix as string
>
>   prefix = left(Path, Instr(Path, ":")-1)
>   Path = mid(Path, Instr(Path, ":")+1)
>
>   Select Case prefix
>     case "MED"
>       message("Show All Episodes")
>
>     case else
>       ... regular linkhandling
>   end select
> end sub
>
>
> ----------------------------------------
>
> > From: rterry at ...1822...
> > To: gambas-user at lists.sourceforge.net
> > Date: Mon, 10 Mar 2008 08:43:29 +1100
> > Subject: [Gambas-user] More Webrowser questions re hyperlinks
> >
> > I've played with this control a little over the weekend, as you can see
> > from the screen dump, i've moved on from my contacts program which is now
> > functioning ok,  to my experimentation with writing a medical records
> > program.
> >
> > I  load patient, add problems, and save clinical notes  written in the
> > texteditor, saved as html on a per problem basis, then the whole lot are
> > amalgamated into a single html pile to display back on the screen when
> > the patient next visits.
> >
> > Now, I want to add a hyperlink to each condition (see the picture
> > included), and was wondering if it was possible to have the hyperlink,
> > but when the user clicks on the link, have a popup menu with options such
> > as "Show all episodes", "Decision support for" etc, rather than what
> > happens at the moment which is the hyperlink just runs off to try and
> > find a file etc.
> >
> > I've tried intercepting the click, but by the time the webbrowser_click
> > is picked up, the webrowser has already run off and done its thing
> > attempting to find the link.
> >
> > Any thoughts/help appreciated.
> >
> > Richard
>
> _________________________________________________________________
> Probeer Live Search: de zoekmachine van de makers van MSN!
> http://www.live.com/?searchOnly=true






More information about the User mailing list