cant find table-dv.js in hooks

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

cant find table-dv.js in hooks

Post by ushay » 2023-04-04 16:36

Hello,

i have purchased the JavaScript Library , my main purpose is to use custom tabs in detailed view like in this link: https://appgini.bizzworxx.de/products/j ... view/tabs/

i have copied AppGiniHelper.min.js to my hooks folder and added <script src="hooks/AppGiniHelper.min.js"></script> to the header-extras.php file,
the table name is sales but i cant find the file sales-dv.js in the hooks folder so i can follow the guide for adding custom tabs.
what am i doing wrong?

also, on the header-extras.php i had this:
<script>
var common = new AppGiniCommon();
common.autoRedirect();
</script>

should i leave it or should i delete it and have only : <script src="hooks/AppGiniHelper.min.js"></script> ?

please your support,

Shay.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 16:48

but i cant find the file sales-dv.js
Just create that "magic" file:
https://bigprof.com/appgini/help/advanc ... agic-files
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 16:58

AppGiniHelper.getCommon().autoRedirect()
This is a special function which helps redirecting users to a given page after forced login. If you need it, you can keep it.

Especially for beginners I highly recommend to learn how to use the browser's development tools with logging and debugging options. You should always check for (red) errors in console tab.
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

Re: cant find table-dv.js in hooks

Post by ushay » 2023-04-04 18:40

dear jsetzer,

thanks for your kind support.

i have created the file and copied the exmpale for "New Tab with multi-column layout" from the (Custom) Tabs guide.
i refreshed the detailed view page but no result.
on the detailed view page i have a few fields for the project details and beneath does fileds i need to add the tabs.

please your support,

Shay.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 18:43

Please remember to reload your browser without caching.

And always check for errors in console tab of developer tools.

There is a troubleshooting guide here:
https://appgini.bizzworxx.de/support/troubleshooting/
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

Re: cant find table-dv.js in hooks

Post by ushay » 2023-04-04 19:07

thanks again jsetzer,

i get this errors:

Uncaught ReferenceError: AppGiniCommon is not defined
at sales_view.php:949:16


(anonymous) @ sales_view.php:949
AppGiniHelper.min.js:7 AppGini Version 23.11
AppGiniHelper.min.js:7 AppGiniHelper Javascript Library Version 2022.12.09.1
AppGiniHelper.min.js:7 Uncaught Error: AppGiniHelper | Uncaught exception: .form-group not found: title
at AppGiniHelper.<computed> [as throw] (AppGiniHelper.min.js:7:66887)
at AppGiniControl.<computed> [as getFormGroup] (AppGiniHelper.min.js:7:80688)
at AppGiniHelper.min.js:7:509779
at Array.forEach (<anonymous>)
at AppGiniLayout.<computed> [as add] (AppGiniHelper.min.js:7:509356)
at sales-dv.js:4:7

do i need do define something on sales_view.php?

shay.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 19:11

do i need do define something on sales_view.php?
No. That library is pure client side (browser) Javascript Library.

It is enough to include the script in hooks/header-extras.php

http://www.appgini.de/docs/Javascript-L ... start.html
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 19:17

Uncaught Error: AppGiniHelper | Uncaught exception: .form-group not found: title

I do not know your code. It looks as if you are addressing a field named "title" which seems to be missing.

Check existence of field "title", double check spelling (lowercase?).

Start with small steps: change only one thing, save, reload without cache, any errors? Then change next small thing and again: save, reload without cache, verify.
If a step is not working, focus on the most recent change.
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 19:22

Uncaught ReferenceError: AppGiniCommon is not defined
at sales_view.php:949:16
Attention: don't mix up PHP code (server side) with javascript code (client side/browser).

AppGiniCommon (which is part of the client side javascript library) cannot be used in server side PHP scripts.
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

Re: cant find table-dv.js in hooks

Post by ushay » 2023-04-04 19:26

i have copied this example:

var dv = AppGiniHelper.DV;

var row_2 = dv.addLayout([8, 4])
.add(1, ["title", "date", "time"])
.add(2, ["status"]);

i have copied it as is to sales-dv.js, maybe that's the "title" causing the error?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1869
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: cant find table-dv.js in hooks

Post by jsetzer » 2023-04-04 19:45

i have copied this example
You have to put your own fieldnames of your sales-table, not my fieldnames, obviously.
Kind regards,
<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 readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

ushay
Veteran Member
Posts: 54
Joined: 2020-06-26 21:30

Re: cant find table-dv.js in hooks

Post by ushay » 2023-04-05 09:59

Hi jsetzer,

sorry, i thought the fields are created in the code, now everything works.
thanks for your patient.

shay.

Post Reply