JavaScript Error in 365 BC WebClient

pompadi1304
Member Posts: 1
Hi!
i'm new in connecting JavaScript and AL, so I hope you can help me:
i wrote a little JavaScript/ HTML CardPage Connection to viaualize some data.
So this is my Code, it's working perfect in my SandBox, but in Production Enviroment i get the Error: Cannot set property 'innerHTML' of null.
So my major question to you is: what is the difference between live enviroment ControlAddin Settings and Sandbox Settings.
HTML:
startup.js:
main.js
so, pretty simple, but not working.... Any Idea?
Thanx so much
i'm new in connecting JavaScript and AL, so I hope you can help me:
i wrote a little JavaScript/ HTML CardPage Connection to viaualize some data.
So this is my Code, it's working perfect in my SandBox, but in Production Enviroment i get the Error: Cannot set property 'innerHTML' of null.
So my major question to you is: what is the difference between live enviroment ControlAddin Settings and Sandbox Settings.
HTML:
<!DOCTYPE html> <html> <head> <script src="bar.js"></script> </head> <body> <div id="chart" bar chart here</div> </body> </html>
startup.js:
(function ($) { $(document).ready(function () { var url = Microsoft.Dynamics.NAV.GetImageResource("test.html"); $("#controlAddIn").load(url); Microsoft.Dynamics.NAV.InvokeExtensibilityMethod('Ready', ''); }); })(jQuery); var ControlBusinessGroupsMonthly; ControlBusinessGroupsMonthly=$("ControlBusinessGroupsMonthly");
main.js
function GoBusiness (bus, j, s){ var data = [ {label: bus[0], value: s [0] }] for (var i = 1; i < j; i++){ var dataCon = [ {label: bus[i], value: s [i] }]; data= data.concat(dataCon); } // Chart Specifications var targetId = 'chart'; var canvasWidth = 660; var canvasHeight = 500; var chart = new BarChart(targetId, canvasWidth, canvasHeight, data); }
so, pretty simple, but not working.... Any Idea?
Thanx so much

0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions