Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Hyperlink to Text Field Values
Hi,

Is it possible to "call a program" based on mouse click in a
particular value in a field.
For Eg:
I am storing the actor's names in a single field for a movie title.
When displaying this movie details as follows
Actors : Arnold,Van Damme,Bruce Willis.
When clicking on "Arnold", another program(Page in web application)to
be opened which lists the movies in which Mr.Arnold has acted. Please
note all the names are stored in a single field with comma seperation.

Please Help

Regards
JAIN

Report this thread to moderator Post Follow-up to this message
Old Post
Jain Jacob
07-29-04 08:55 AM


Re: Hyperlink to Text Field Values
you can try using the EVENT:SELECTED event:

myField    STRING('Arnold,Van Damme,Bruce Willis')
MyWindow WINDOW('Caption'),AT(,,260,100),GRAY
 ENTRY(@s20),AT(30,14,148,10),USE(myField
),FONT(,,COLOR:Blue,FONT:underline,C
HARSET:ANSI),CURSOR(CURSOR:UpArrow)
BUTTON('Close'),AT(159,60,45,14),USE(?Close),STD(STD:Close)
END

CODE
OPEN(MyWindow)
ACCEPT
CASE FIELD()
OF ?MyField
IF EVENT() = EVENT:SELECTED THEN
CASE ?MyField{PROP:SELSTART}
OF 1 TO 7
!ShellExecute for Arnold
OF 8 TO 17
!ShellExecute for Van Damme
OF 18 TO 30
!ShellExecute for Bruce Willis
END
END
END
END

jainjacob@cochincomputers.com (Jain Jacob) wrote in message news:<775d8658.0407282049.7809b
970@posting.google.com>...
> Hi,
>
> Is it possible to "call a program" based on mouse click in a
> particular value in a field.
> For Eg:
> I am storing the actor's names in a single field for a movie title.
> When displaying this movie details as follows
> Actors : Arnold,Van Damme,Bruce Willis.
> When clicking on "Arnold", another program(Page in web application)to
> be opened which lists the movies in which Mr.Arnold has acted. Please
> note all the names are stored in a single field with comma seperation.
>
> Please Help
>
> Regards
> JAIN

Report this thread to moderator Post Follow-up to this message
Old Post
Hilario Perez
07-29-04 08:55 PM


Re: Hyperlink to Text Field Values
Thanks for the solution.The length will not be a constant.That may
vary from record to record.That may be solved by finding the position
of comma and so on, Is it possible to provide a hyperlink and "hand
pointer" like interface and that also in a two dimensional
presentation style(just like  prompts) instead of a three dimensional
field(For Eg :address filed in your browser).The context is  a web
page to be developed in Clarion6 not a clarion program.



hilario@sistemasfw.com (Hilario Perez) wrote in message news:<e7fd3193.0407290944.74ceca0a@
posting.google.com>...
> you can try using the EVENT:SELECTED event:
>
> myField    STRING('Arnold,Van Damme,Bruce Willis')
> MyWindow WINDOW('Caption'),AT(,,260,100),GRAY
>       ENTRY(@s20),AT(30,14,148,10),USE(myField
),FONT(,,COLOR:Blue,FONT:unde
 rline,CHARSET:ANSI),CURSOR(CURSOR:UpArro
w)
>        BUTTON('Close'),AT(159,60,45,14),USE(?Close),STD(STD:Close)
>      END
>
>    CODE
>    OPEN(MyWindow)
>    ACCEPT
>       CASE FIELD()
>         OF ?MyField
>           IF EVENT() = EVENT:SELECTED THEN
>              CASE ?MyField{PROP:SELSTART}
>                 OF 1 TO 7
>                    !ShellExecute for Arnold
>                 OF 8 TO 17
>                    !ShellExecute for Van Damme
>                 OF 18 TO 30
>                    !ShellExecute for Bruce Willis
>              END
>           END
>       END
>    END
>
> jainjacob@cochincomputers.com (Jain Jacob) wrote in message news:<775d8658
.0407282049.7809b970@posting.google.com>... 

Report this thread to moderator Post Follow-up to this message
Old Post
Jain Jacob
07-30-04 08:55 AM


Re: Hyperlink to Text Field Values
Use a Queue:


myQueue QUEUE,PRE(Mq)
Name      STRING(20)   !Actor Name
Link      CSTRING(251) !Internet URL
END
myField    STRING(250)
MyWindow WINDOW('Caption'),AT(,,260,100),GRAY
 ENTRY(@s20),AT(30,14,148,10),USE(myField
),FONT(,,COLOR:Blue,FONT:underline,C
 HARSET:ANSI),CURSOR(CURSOR:UpArrow),TRN,
READONLY
BUTTON('Close'),AT(159,60,45,14),USE(?Close),STD(STD:Close)
END

CODE
OPEN(MyWindow)
ACCEPT
IF EVENT() = EVENT:OPENWINDOW THEN
!
! Load the Queue with actors. You can do a loop throught a
file
! maybe, like:
!
! FREE(myQueue)
! SET(ACTORS)
! LOOP
!   IF ACCESS:ACTORS.NEXT() THEN BREAK.
!   Mq:Name = ACT:Name
!   Mq:Link = 'http://www.actors.com/showmovies.asp?actor='
& ACT:Name
!   ADD(myQueue)
! END
! DO LoadMyField
!
FREE(myQueue)
Mq:Name = 'Arnold'; Mq:Link = 'http://www.arnold.com';
ADD(myQueue)
Mq:Name = 'Van Damme'; Mq:Link = 'http://www.vandamme.com';
ADD(myQueue)
Mq:Name = 'Bruce Willis'; Mq:Link =
'http://www.brucewillis.com';
ADD(myQueue)
DO LoadMyField
END
CASE FIELD()
OF ?MyField
IF EVENT() = EVENT:SELECTED THEN
LOOP REC# = 1 TO RECORDS(myQueue)
GET(myQueue,Rec#)
Pos# = INSTRING(CLIP(Mq:Name),MyField,1,1)
IF Pos# < 1 THEN CYCLE.
IF INRANGE(? MyField{PROP:SELSTART},Pos#,Pos#+LEN(CLI
P(Mq:Name)))
!Call ShelExecute, using Mq:Link as the URL
END
END
END
END
END

LoadMyField ROUTINE
MyField = ''
IF RECORDS(myQueue) THEN
GET(myQueue,1)
MyField = CLIP(Mq:Name)
LOOP REC# = 2 TO RECORDS(myQueue)
GET(myQueue,REC#)
myField = CLIP(myField) & ',' & CLIP(Mq:Name)
END
END
DISPLAY

jainjacob@cochincomputers.com (Jain Jacob) wrote in message news:<775d8658.0407292038.30e67
e55@posting.google.com>...
> Thanks for the solution.The length will not be a constant.That may
> vary from record to record.That may be solved by finding the position
> of comma and so on, Is it possible to provide a hyperlink and "hand
> pointer" like interface and that also in a two dimensional
> presentation style(just like  prompts) instead of a three dimensional
> field(For Eg :address filed in your browser).The context is  a web
> page to be developed in Clarion6 not a clarion program.
>
>
>
> hilario@sistemasfw.com (Hilario Perez) wrote in message news:<e7fd3193.040
7290944.74ceca0a@posting.google.com>... 

Report this thread to moderator Post Follow-up to this message
Old Post
Hilario Perez
07-31-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clarion archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:25 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.