The current hyperlink from the table
- 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
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 (181.32 KiB) Viewed 14543 times
Re: The current hyperlink from the table
you have to check in o:Itemselect SlotEugene 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?
Code: Select all
oBrowse:itemSelected := {| uNIL1, uNIL2, oSelf | DoIT(oSelf) }
Code: Select all
FUNCTION DoIT(oBrowse)
LOCAL nCol := oBrowse:colPos
...
IF nCol = 007
HP_GOTO( FIELDGET(nCol) )
ELSE
// normal Code
ENDIF
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
Jimmy
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: The current hyperlink from the table
DC_SpawnUrl() should do it.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: The current hyperlink from the table
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.
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
Real Business Applications Ltd
http://www.rbauk.com
Re: The current hyperlink from the table
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.
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.
- 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
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:
[/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
Code: Select all
DCBROWSECOL FIELD WebAppls->Appl_Name HEADER "Наименование приложения" PARENT WebAppls FONT "9.Courier" WIDTH 45 PROTECT {|| .T. } COLOR {||{nil,aColor[153]}}
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
Re: The current hyperlink from the table
I will write you a sample program on how to do this.
The eXpress train is coming - and it has more cars.
- 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
Great! Thank you in advance!rdonnay wrote:I will write you a sample program on how to do this.
Re: The current hyperlink from the table
It will save me time if you give me your database.
The eXpress train is coming - and it has more cars.
- 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
Here it isrdonnay wrote:It will save me time if you give me your database.
- Attachments
-
- WebAppls.zip
- (1.96 KiB) Downloaded 760 times