O4W_LINKTYPE_CLICK$ (O4W)
At 07 MAY 2023 09:20:39PM Barry Stevens wrote:
O4WLink(text, linktype, linkto, target, id, style)
for linktype = O4W_LINKTYPE_CLICK$
what are the values for linkto and target
At 08 MAY 2023 08:35AM bshumsky wrote:
O4WLink(text, linktype, linkto, target, id, style)
for linktype = O4W_LINKTYPE_CLICK$
what are the values for linkto and target
Hi, Barry. A LINKTYPE_CLICK$ isn't a "real" link, it just raises a click event (which you can catch in your commuter module or O4W custom stored procedure), so the linkto and target parameters aren't really used. The only parameter you MUST specify (in addition to the text and linktype, of course) is the ID - linktype_click$s must have an ID, so that your commuter module/stored procedure can identify which link has been clicked.
Hope that helps,
- Bryan Shumsky
At 08 MAY 2023 07:01PM Barry Stevens wrote:
O4WLink(text, linktype, linkto, target, id, style)
for linktype = O4W_LINKTYPE_CLICK$
what are the values for linkto and target
Hi, Barry. A LINKTYPE_CLICK$ isn't a "real" link, it just raises a click event (which you can catch in your commuter module or O4W custom stored procedure), so the linkto and target parameters aren't really used. The only parameter you MUST specify (in addition to the text and linktype, of course) is the ID - linktype_click$s must have an ID, so that your commuter module/stored procedure can identify which link has been clicked.
Hope that helps,
- Bryan Shumsky
Thats what I thought , but I found I had to do an o4wqualify for the click event, which is why I was asking in case I missed something.
At 11 MAY 2023 01:02PM bshumsky wrote:
Hi, Barry. The O4WLink call, with linktype O4W_LINKTYPE_CLICK$, should automatically "qualify" the link event for you. I've just tried it here with the following routine:
Subroutine O4W_TEST(CtrlEntID,Event,Response) $Insert O4WCommon $Insert O4WEquates Begin Case Case event _Eqc "CREATE" O4WForm() o4wtext("click " ) o4wlink("here", O4W_LINKTYPE_CLICK$, "", "", "LINKID" ) o4wtext(" to generate an event" ) Case 1 O4WResponse() O4WError("We got *":event:"* for *":ctrlentid:"*" ) End case Return 0And when I click on the word "here", I get an alert telling me the event was "CLICK" for control "LINKID". Can you try the same and see if you get the same behavior?
Hope that helps,
- Bryan Shumsky
At 11 MAY 2023 09:42PM Barry Stevens wrote:
Hi, Barry. The O4WLink call, with linktype O4W_LINKTYPE_CLICK$, should automatically "qualify" the link event for you. I've just tried it here with the following routine:
Subroutine O4W_TEST(CtrlEntID,Event,Response) $Insert O4WCommon $Insert O4WEquates Begin Case Case event _Eqc "CREATE" O4WForm() o4wtext("click " ) o4wlink("here", O4W_LINKTYPE_CLICK$, "", "", "LINKID" ) o4wtext(" to generate an event" ) Case 1 O4WResponse() O4WError("We got *":event:"* for *":ctrlentid:"*" ) End case Return 0And when I click on the word "here", I get an alert telling me the event was "CLICK" for control "LINKID". Can you try the same and see if you get the same behavior?
Hope that helps,
- Bryan Shumsky
Yes that works.
Also if I add it to the 'pageshow' event where my reported issue is, it also works. So looks like I need to examine my o4wlink params a bit closer.
At 11 MAY 2023 10:12PM Barry Stevens wrote:
Hi, Barry. The O4WLink call, with linktype O4W_LINKTYPE_CLICK$, should automatically "qualify" the link event for you. I've just tried it here with the following routine:
Subroutine O4W_TEST(CtrlEntID,Event,Response) $Insert O4WCommon $Insert O4WEquates Begin Case Case event _Eqc "CREATE" O4WForm() o4wtext("click " ) o4wlink("here", O4W_LINKTYPE_CLICK$, "", "", "LINKID" ) o4wtext(" to generate an event" ) Case 1 O4WResponse() O4WError("We got *":event:"* for *":ctrlentid:"*" ) End case Return 0And when I click on the word "here", I get an alert telling me the event was "CLICK" for control "LINKID". Can you try the same and see if you get the same behavior?
Hope that helps,
- Bryan Shumsky
That is weird, I removed my o4wquality and now it is working. But, I have done a shutdown reboot since it wasnt - maybe my 'experimenting' 😜 stuffed something in cache or whatever.
At 12 MAY 2023 04:43PM Barry Stevens wrote:
Hi, Barry. The O4WLink call, with linktype O4W_LINKTYPE_CLICK$, should automatically "qualify" the link event for you. I've just tried it here with the following routine:
Subroutine O4W_TEST(CtrlEntID,Event,Response) $Insert O4WCommon $Insert O4WEquates Begin Case Case event _Eqc "CREATE" O4WForm() o4wtext("click " ) o4wlink("here", O4W_LINKTYPE_CLICK$, "", "", "LINKID" ) o4wtext(" to generate an event" ) Case 1 O4WResponse() O4WError("We got *":event:"* for *":ctrlentid:"*" ) End case Return 0And when I click on the word "here", I get an alert telling me the event was "CLICK" for control "LINKID". Can you try the same and see if you get the same behavior?
Hope that helps,
- Bryan Shumsky
That is weird, I removed my o4wquality and now it is working. But, I have done a shutdown reboot since it wasnt - maybe my 'experimenting' 😜 stuffed something in cache or whatever.
Worked just the once then stopped.
Put back the qualifyevent and all is now working.
I will leave it at that as it works for me.