Page 1 of 1

Opening a Link

Posted: Tue Nov 19, 2024 1:27 pm
by omni
What is a method for a user to click on a link and it open for them. we download a lot of data and some of the backup may be on an open link to view. The // is an issue on what I have tried.
Ex: https://lp.omni.com/reports/249823984

Thanks
Fred Omni

Re: Opening a Link

Posted: Tue Nov 19, 2024 3:16 pm
by rdonnay
Did you try this?

DC_SpawnUrl("https://lp.omni.com/reports/249823984")

Re: Opening a Link

Posted: Wed Nov 20, 2024 12:23 am
by Tom
Or in a dialog:

Code: Select all

@ 0,0 DCSAY 'Internet:' GET cURL HYPERLINK {||IF(!Empty(cURL),DC_SpawnUrl(cUrl),NIL)} COLOR GRA_CLR_BLUE,XBPSYSCLR_TRANSPARENT

Re: Opening a Link

Posted: Wed Nov 20, 2024 10:57 am
by omni
They don't actually enter it, we have it saved, so its a variable.
If we try to put the field in a variable it says its invalid due to the // in the field, if that makes sense. treats it as a remark.

clink="https://lp.driveroo.com/report/35321825"
will not compile, says newline character...etc
Was trying to use DC_SPAWNURL as we usually do...
Even if we store the saved field to the clink, gives the same message when we get to the DC_SPAWNURL

Fred

"

Re: Opening a Link

Posted: Wed Nov 20, 2024 3:18 pm
by rdonnay
That doesn't make sense.
I just created test.prg with the below code.
I compiled and ran it with no problem.

Code: Select all

FUNCTION Main()

LOCAL cLink

cLink := 'https://lp.driveroo.com/report/35321825'

DC_SpawnUrl(cLink)

RETURN nil

Re: Opening a Link

Posted: Wed Nov 20, 2024 3:41 pm
by omni
Did the same test multiple times...over on the far right where I could not see it was another ".
My Idiot time. Of course it worked, like I thought it should.

Thanks, and sorry for your trouble.

Re: Opening a Link

Posted: Thu Nov 21, 2024 4:55 am
by rdonnay
I could not see it was another ".
I have lost several hours of productive time over my 45-year programming career to those damn misplaced quotes.