cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Cannot get Json for custom widget to Close.

Cannot get Json for custom widget to Close.

MrAdam1983
Long-established Member

until last week I had absolutly no experince with Javascript, I now know more than i ever wanted to know but of course I cannot figure something out.  Now, this code forks heavily from the WebIQ samples; I have been using a combination of Bing AI, ChatGTP, Online Javascript validator, and JSlint to try and get this code functional.  I am attempting to make a momentary push button widget with 2 states that uses a command and a status tag, I am trying make the screen development easier for my engineers by reducing the amount of work they have to invest.  I just want objects that already cohere to our development style and practive, that they drop on the screen, assing tags to, and run.  I am sure there are easier ways to do this but this is a base framework for additional features I want to add.

as of right now, the debug in wediq errors on the very last line with "Uncaught SyntaxError: Unexpected token ')'". everything i read, including the sample code, says that what I have "})();" is exactly how I should be closing the code so i assume there is something wrong prior to this.  but I cannot figure it out.  It appears I have all of the correct blocks.

any insight is appraciated, I think i really close to having this functional. 

 

 

4 REPLIES 4

webiq-sk
Frequent Contributor

Ok, here's a human intelligence responding 😉

It should work like this - each curly brace that's been opened has to be closed again:

webiqsk_0-1692106817807.png

 

 

MrAdam1983
Long-established Member

that was it, that was all of it.  I think I am startingot understand teh syntax and structuring. 

webiq-sk
Frequent Contributor

Just keep in mind that you're writing pure JavaScript here - there's nothing inbetween your code and the browser - it's sent unmodified, so it has to adhere to JavaScript standards. 

MrAdam1983
Long-established Member

right.

I have no experince with those standards, this si all new to me and I am on a crash course.  with that said, I have objects on the screen now and the latest issue I comperhend but i don't understand how it exist.  i will post a new topic for that. 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist