Show JQuery Modal dialog

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
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Show JQuery Modal dialog

Post by alex4orly »

I am using the WWB Dialog, initially on load it is hidden
I know I can show it with a button click, but I want to do it programatically with Javascript

The reason, I have several dialogs and I want to decide based on the OS, should the onclick show the dialog

Some help please

Thanks
User avatar
Pablo
 
Posts: 23450
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Show JQuery Modal dialog

Post by Pablo »

For jQuery UI see:
https://api.jqueryui.com/dialog/

For Bootstrap see:
https://getbootstrap.com/docs/4.0/components/modal/

You can also look at the code that WWB generates for events.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Show JQuery Modal dialog

Post by alex4orly »

Hello again,

I tried both, Jquery and Bootsrap.

I inserted the Dialog in WWB from the standard in the JQuery UI / Bootsrap

In either of the cases, I looked at the code that WWB is generating, I fail to figure out how to do it from the documentation

My Dialog ID is Dialog1 Na in the code generated I see the following line:

a id="Button6" href="https://squadron-125.org.il/mypdf/yoramavni.pdf" target="Extension2" onclick="$('#Dialog1').dialog('open');window.reload(true);return false;" style="display:inline-block;width:128px;height:30px;z-index:2;">הסיפור שלי</a>


Do I need to insert into the script this line ?
$('#Dialog1').dialog('open');

Thanks
User avatar
Pablo
 
Posts: 23450
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Show JQuery Modal dialog

Post by Pablo »

Do I need to insert into the script this line ?
$('#Dialog1').dialog('open');
Correct
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Show JQuery Modal dialog

Post by alex4orly »

Thanks again,

This works fine
Post Reply