Hi,
Thank you for the Library..... I have a question though.... In the code below when I add it to the Event-tv.js it renders the 2 buttons but the link that it will go to is the same as the last link.... in other words if I even add another button it will show nice but all the buttons will go to the 3rd link
What do I have to do if I have more than one button and each button is separate?
jQuery(function(){
jQuery('#Filter').after('<button class="btn btn-warning" type="button" id="filter-button"><i class="glyphicon glyphicon glyphicon-link"></i> Go To - Event Dashboard</button>');
jQuery('button[id=filter-button]').click(function(){
window.location = 'dashboard-event-operations.php';
});
});
jQuery(function(){
jQuery('#Filter').after('<button class="btn btn-warning" type="button" id="filter-button"><i class="glyphicon glyphicon glyphicon-link"></i> Create a new event</button>');
jQuery('button[id=filter-button]').click(function(){
window.location = 'Event_view.php?addNew_x=1';
});
});
[CLOSED] Can't use more than one button
-
- Veteran Member
- Posts: 90
- Joined: 2015-11-23 01:02
Re: Can't use more than one button
Hi,
is your question related to AppGini Helper JavaScript Library or is it a Javascript question in general? I cannot see any AGH JS Lib function-call there.
Best,
Jan
---
AppGini 5.81.1094
is your question related to AppGini Helper JavaScript Library or is it a Javascript question in general? I cannot see any AGH JS Lib function-call there.
Best,
Jan
---
AppGini 5.81.1094
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
-
- Veteran Member
- Posts: 90
- Joined: 2015-11-23 01:02
Re: Can't use more than one button
related to AppGini Helper JavaScript Library ..... what am I missing?
Re: Can't use more than one button
Can you please post the code from Events-tv.js.
If you want to add two or more buttons in table view, there should be at least two lines in TABLENAME-tv.js having .addButton(...) or .addLink(...). I can only help you if I can see your code. You can send me a PM if you like.
Best,
Jan
---
AppGini 5.81.1094
If you want to add two or more buttons in table view, there should be at least two lines in TABLENAME-tv.js having .addButton(...) or .addLink(...). I can only help you if I can see your code. You can send me a PM if you like.
Best,
Jan
---
AppGini 5.81.1094
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
-
- Veteran Member
- Posts: 90
- Joined: 2015-11-23 01:02
Re: Can't use more than one button
That's all the code that I inserted in this case on the Events-tv.js that I have currently. I took the example from your plugin tutorial maybe I'm missing something but the code that I have If I use only one link it actually works nice, the problem is with 2 links it sends on both links to only one link which is the last url on the script.
Re: Can't use more than one button
Maybe I have missed something: Which plugin tutorial are you referring to? Please post the link!
Adding buttons or links to table view can be done with .addButton() and .addLink() functions described here:
https://appgini.bizzworxx.de/products/j ... able-view/
https://appgini.bizzworxx.de/products/j ... addbutton/
https://appgini.bizzworxx.de/products/j ... w/addlink/
There is sample code for both functions. You need a tv object and call one of these functions for every new button. The code you have listed does not contain any of these function calls. Instead, you are using jquery to create buttons, and on each new button you replace the function call of all existing buttons by the function call of the new (last) button. This gives exactly the result you are experiencing here.
If you want to use our library function, please use .addButton or .addLink as described in the links above.
Best,
Jan
Adding buttons or links to table view can be done with .addButton() and .addLink() functions described here:
https://appgini.bizzworxx.de/products/j ... able-view/
https://appgini.bizzworxx.de/products/j ... addbutton/
https://appgini.bizzworxx.de/products/j ... w/addlink/
There is sample code for both functions. You need a tv object and call one of these functions for every new button. The code you have listed does not contain any of these function calls. Instead, you are using jquery to create buttons, and on each new button you replace the function call of all existing buttons by the function call of the new (last) button. This gives exactly the result you are experiencing here.
If you want to use our library function, please use .addButton or .addLink as described in the links above.
Best,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Can't use more than one button
Did you fix the bugs? Or is this still open?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools