The current hyperlink from the table

This forum is for eXpress++ general support.
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

The current hyperlink from the table

#1 Post by Eugene Lutsenko »

Is it possible to make a field in the table the absolute value of a hyperlink so that when viewing this table clicking on this field we got the go to website?
Attachments
13.jpg
13.jpg (181.32 KiB) Viewed 14546 times

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: The current hyperlink from the table

#2 Post by Auge_Ohr »

Eugene Lutsenko wrote:Is it possible to make a field in the table the absolute value of a hyperlink so that when viewing this table clicking on this field we got the go to website?
you have to check in o:Itemselect Slot

Code: Select all

oBrowse:itemSelected := {| uNIL1, uNIL2, oSelf | DoIT(oSelf) } 
where you click

Code: Select all

FUNCTION DoIT(oBrowse)
LOCAL nCol := oBrowse:colPos
   ...
   IF nCol = 007
      HP_GOTO( FIELDGET(nCol) )
   ELSE
      // normal Code
   ENDIF 
next Code i use with Firefox.

Code: Select all

FUNCTION HP_GOTO(myhttpadr)
LOCAL oReg, uVal

   oReg := XbpReg():NEW('HKEY_CLASSES_ROOT\HTTP\shell\open\command')
   IF ! oReg:Status()
      MSGBOX("no Browser installed !")
      RETURN NIL
   ENDIF

   oReg:ReadBinType("C")
   uVal := oReg:Standard
   uVal := ALLTRIM( SUBSTR(uVal,1,AT("-",uVal)-1))
   uVal := ALLTRIM(STRTRAN(uVal,CHR(34),""))

   RunShell( myhttpadr, uVal, .T. )
RETURN NIL
greetings by OHR
Jimmy

Wolfgang Ciriack
Posts: 484
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: The current hyperlink from the table

#3 Post by Wolfgang Ciriack »

DC_SpawnUrl() should do it.
_______________________
Best Regards
Wolfgang

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: The current hyperlink from the table

#4 Post by reganc »

The :itemselected slot that Jimmy mentioned translates to the ITEMSELECTED clause on the DCBROWSE command. That also means a double click would be needed.

You could probably also do the same thing but for a single click by assigning a codeblock to the columns datarea lbclick callback but I haven't tried that.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: The current hyperlink from the table

#5 Post by rdonnay »

I recommend that you also use the ITEMSELECTED clause to call DC_SpawnUrl().

If you MUST do this on one click, then you interfere with the navigation system of the DC_XbpBrowse() class.
It is possible to do this, but you will not like the results.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The current hyperlink from the table

#6 Post by Eugene Lutsenko »

For some reason I immediately imagined what it must be like to make the background color of the column. Only instead of the COLOR should be like a HYPERLINK:

Code: Select all

DCBROWSECOL FIELD WebAppls->Appl_Name HEADER "Наименование приложения" PARENT WebAppls FONT "9.Courier" WIDTH 45 PROTECT {|| .T. } COLOR {||{nil,aColor[153]}}                            
[/size]

But how to access the field value when it is clicked?
DCBROWSECOL .... ACTION {||DC_SpawnUrl(???)}

PS
Of course it would be convenient if it worked in one click, as usual with hyperlinks

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: The current hyperlink from the table

#7 Post by rdonnay »

I will write you a sample program on how to do this.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The current hyperlink from the table

#8 Post by Eugene Lutsenko »

rdonnay wrote:I will write you a sample program on how to do this.
Great! Thank you in advance!

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: The current hyperlink from the table

#9 Post by rdonnay »

It will save me time if you give me your database.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The current hyperlink from the table

#10 Post by Eugene Lutsenko »

rdonnay wrote:It will save me time if you give me your database.
Here it is
Attachments
WebAppls.zip
(1.96 KiB) Downloaded 760 times

Post Reply