Page 1 of 1
addLink to new tab
Posted: 2021-11-08 13:45
by sgrzy01
Sorry if I'm missing something obvious, but is there a way with addLink, in the formation of the URL or other way that the called URL will open in a new tab?
Thanks!.
Re: addLink to new tab
Posted: 2021-11-08 18:12
by jsetzer
Sorry, I don't understand your request.
Re: addLink to new tab
Posted: 2021-11-08 18:42
by sgrzy01
Sorry,
I'm using the addlink function to add a button to launch a custom page from the table view. Currently it opens in the current tab, I like to know if I could have it open in a new tab... basically add a target="_blank" to the url
Re: addLink to new tab
Posted: 2021-11-08 20:55
by jsetzer
(1) You can use addButton and open in new tab using javascript code
(2) will be back at the office on Wednesday. Then I will check if there is an additional parameter for target in addLink function
Re: addLink to new tab
Posted: 2021-11-24 07:05
by jsetzer
Sorry for the long delay, I have taken a look at the sources for
.addLink()
-method of
AppGiniHelper.TV
-class.
In latest version there
is a 6th parameter for target:
Syntax
Code: Select all
AppGiniHelper.TV.addLink(href, icon, text, Variation.default, prompt, target, onBeforeRender)
Example
Code: Select all
// file: hooks/TABLENAME-tv.js
jQuery(document).ready(function(){
var tv = AppGiniHelper.TV;
tv.addLink("my_custom_page.php", "flash", "Open My Custom Page", Variation.primary, "Are you sure?", "_blank");
});
target-Parameter
-
_self
(default) Opens the given href in same tab
-
_blank
Opens the given href in a new tab
-
myTabName
(any string) Opens the given href in a new tab or existing tab, if already exists
-
null
Evaluates to "_self
"
Re: addLink to new tab
Posted: 2022-04-14 21:43
by grimblefritz
A little late to resurrect a thread, but related:
Is there a reference somewhere that shows and explains available functions and parameters?
With the js minified, and the online documentation being somewhat lacking, it is a little bit of a chore to suss out the details at times.
Re: addLink to new tab
Posted: 2022-04-14 22:01
by jsetzer
Hi, if there is anything missing in the docs, please tell me and I will try to add asap.
Additionally, if you have questions concerning functions or parameters just send an email with your latest ordernumber to
[email protected]. Usually I answer support requests the same day.
Re: addLink to new tab
Posted: 2022-04-22 19:35
by grimblefritz
Lacking, as in, where is the concise reference?
The case/example based documentation is ok for newbs, but it is cumbersome when trying to remember the name of a function or its parameters. This is more often the case when something is familiar, only the details are fuzzy.
BTW, AppGini itself is not much better in this regard.
This page is about as close as it gets to a good reference. There are many other things AG provides in addition to what's on that page, and there are other lists, but finding it all can be an adventure. A single reference point would be a godsend.
The AG Helper libraries have the same situation. It's all there, but you have to spend time digging for it. Or build up your own reference via bookmarks. Futhermore, for people like me with memory problems, digging through the site takes a LOT longer than scanning a concise reference.
Anyway, didn't mean to knock on it as a product. It's capable. But it could use better reference material. In my opinion
If there's further discussion needed, we can take it offline or into a new thread.