events javascript do not work anymore in WWB18

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

events javascript do not work anymore in WWB18

Post by ART »

In WWB17 I used event onclick run javascript, but since i upgraded to WWB18 this does not work anymore. Do i need to make changes?
User avatar
Pablo
 
Posts: 21582
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: events javascript do not work anymore in WWB18

Post by Pablo »

You should not have to make any changes.
If you need help, then please provide more details.
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

I have a page on my website published from WWB 17 which can be found here: tinyurl.com/y83e5rs5
The same page without any modification from WWB 18 can be found here: tinyurl.com/4hk5nwt8

In the WWB 17 version you can click on a link, a photo etc and it wil show the relevant object using events onclick javascript
In the WWB 88 version this does not work anymore
User avatar
Pablo
 
Posts: 21582
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: events javascript do not work anymore in WWB18

Post by Pablo »

Which part of the page does not work?
Can you please be more specific?

Note that if you have added custom code to control the Bootstrap carousel, then you need to update this because WWB18 now uses Bootstrap5. Bootstrap 5 no longer uses jQuery.
For example:

Code: Select all

$('#Carousel1').bootstrapcarousel(1); 
should now be

Code: Select all

bootstrap.Carousel.getInstance('#Carousel1').to(1);
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

If on the WWB18 derived page you click on the small photop's, it does not change anymore to the relevant accommodation. You can try if you look to the page i mentioned earlier.

I thought you said one does not have to make any changes?

I am using the following events when one clcks on a photo:

event onclick
action javascript
venster
$('#SlidesCarousel1').bootstrapcarousel(7);
$('#BoekingCarousel1').bootstrapcarousel(7);
$('#TextCarousel1').bootstrapcarousel(7);
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: events javascript do not work anymore in WWB18

Post by crispy68 »

So based on the code you just typed it looks like the code that Pablo mentioned in previous post. You will need to change your code to match what he mentioned.

ex: $bootstrap.Carousel.getInstance('#SlidesCarousel1').to(7);
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

I have changed the event as indicated by you and pablo, but it does not work. I have republished the page again to: tinyurl.com/4hk5nwt8
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: events javascript do not work anymore in WWB18

Post by crispy68 »

The code you placed is incorrect. I see a left bracket rather than a parenthesis.

Code: Select all

bootstrap.Carousel.getInstance('#SlidesCarousel1').to(7);
Also, there is an error on your page via inspector.
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

I copied and pasted it, but i redid it and republished it but it still does not work

The error is

Uncaught ReferenceError: $bootstrap is not defined
User avatar
Pablo
 
Posts: 21582
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: events javascript do not work anymore in WWB18

Post by Pablo »

When I visit the URL, then there are still many references to 'bootstrapcarousel'

You will need to replace all instances of the code.
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

OK. A bit disappointing I must say, because I thought no changes would have to be made. And I am not an it-expert. Anyway i will try to fix that.
Last edited by ART on Tue Nov 22, 2022 10:35 am, edited 1 time in total.
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

I thought I adapted all relevant items, butIi still get the error message: Uncaught ReferenceError: $bootstrap is not defined
How can i find other items to change?

Also there are 2 other errors:

Uncaught DOMException: Document.querySelector: './index.php' is not a valid selector

Uncaught TypeError: i is null
User avatar
Pablo
 
Posts: 21582
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: events javascript do not work anymore in WWB18

Post by Pablo »

because I thought no changes would have to be made.
That was before you mentioned that you were using custom code for the Bootstrap carousel.
Because you have added the code manually, you will also have to update it manually.
This is not directly related to WWB, Bootstrap has been updated. We do not have any control over changes in third party frameworks.
We just try to keep WWB up-to-date!

If you need further assistance then please share DEMO project so I can see all your settings.
https://www.wysiwygwebbuilder.com/forum ... 10&t=82134
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

I am not sure waht you mean with costum code etc but you can find the demo here: tinyurl.com/4hrm62ua
Hope this is OK for you or do i need to sent it by mail?
User avatar
Pablo
 
Posts: 21582
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: events javascript do not work anymore in WWB18

Post by Pablo »

I was asking for a DEMO proejct (wbs)

For further details about how to share a project file, please see this FAQ:
https://www.wysiwygwebbuilder.com/forum ... 10&t=82134
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

Pablo
Please find the wbs file and all photo's here https://drive.google.com/file/d/1eEFJRD ... sp=sharing
User avatar
Pablo
 
Posts: 21582
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: events javascript do not work anymore in WWB18

Post by Pablo »

You forgot to change the events in SlidesCarousel1

Also,

Code: Select all

$bootstrap.Carousel
should be

Code: Select all

bootstrap.Carousel
You can get an overview of all events on the page via Page -> Events -> Events - All

Image
ART
 
 
Posts: 237
Joined: Fri Sep 28, 2012 3:25 pm

Re: events javascript do not work anymore in WWB18

Post by ART »

Thanks.

Indeed simply by deleting the $ from the line as advised by you previously, it works again.
Post Reply