how to run list_X.js on view detail button click?

Hmm, yeah, we don't have any Fabrik events we fire when clicking on those. We just hang our own click event, and figure out in that if we just go to the link, or open an AJAX popup.

Either you can get creative, maybe create your own link button in a calc element with an onClick that fires your list_X.js function ... or I could possibly add firing an event in our openSingleView function, which handles all clicks on view, edit and delete buttons. Pass the args that openSingleView uses, and let you take it from there.

Ping me tomorrow about this, meanwhile I'll have a think, and maybe add a new event for you.

-- hugh
 
Hi I was trying to get creative and add a button in a calc element, but I was unable to figure out how to do it: adding a <button> tag in the calc element throws out a syntax error but I didn't find examples or specific documentation about it, I am trying blindly.. May you point me in the right direction please? :)

thank you
 
Ah I found it (it was a silly question indeed) however I think am still missing something:

I put a php link in the calc textarea (using a element) in details section:

return "<a href=\"#\">View</a>" ;


and a simple js in the Javascript section

alert("doing things");

selected event click but nothing happens when clicking the link (it goes to # as expected, but it ignores the alert).

any help is appreciated, thank you
 
Friendly bump :) I think I could avoid the additional event if I understand how to call the js.
Thank you
 
I'm not sure if calc fields support click events (as the calc element is just a div). Easiest way would probably to add an onclick="alert('doing things');" to the link you create in the calc. Although do actually Do The Thing, you'd want to call a function you define in a list_X.js file.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top