I would like to hide in a list view the href url value in the status bar when mouse hover the link label. In words, I want to implement with fabrik a something like the following line of code:
<a href="javascript:void(0)" onclick="location.href="'.$mylink.'">Link</a>
$mylink is the concatenation of index.php?id= and a list_name___element_name value.
I have tried the following:
- I type "javascript:void(0)" as custom link in the list view settings tab of my link element.
- I create a X.js file in the com_fabrik/js folder with the following code:
function link() {
var useridname = Fabrik.getBlock('form_X').formElements.get('list_name___element_name');
useridval = useridname.get('value');
url = "index.php?rowid=" + encodeURIComponent(useridval);
location.href="url";
}
(X is the number of the form where the link element is located)
- I initialize the "link" function with the following settings in the javascript tab of my link element:
. event: click.
. javascript code: link();
The scheme however doesn't work. Nothing is happening when I click on the label of my link in a list view.
What did I wrong ? If my scheme cannot work, how can I implement this in Fabrik ?
<a href="javascript:void(0)" onclick="location.href="'.$mylink.'">Link</a>
$mylink is the concatenation of index.php?id= and a list_name___element_name value.
I have tried the following:
- I type "javascript:void(0)" as custom link in the list view settings tab of my link element.
- I create a X.js file in the com_fabrik/js folder with the following code:
function link() {
var useridname = Fabrik.getBlock('form_X').formElements.get('list_name___element_name');
useridval = useridname.get('value');
url = "index.php?rowid=" + encodeURIComponent(useridval);
location.href="url";
}
(X is the number of the form where the link element is located)
- I initialize the "link" function with the following settings in the javascript tab of my link element:
. event: click.
. javascript code: link();
The scheme however doesn't work. Nothing is happening when I click on the label of my link in a list view.
What did I wrong ? If my scheme cannot work, how can I implement this in Fabrik ?