Title: Programatically open dialog
Last modified: January 15, 2018

---

# Programatically open dialog

 *  Resolved [perryrylance](https://wordpress.org/support/users/perryrylance/)
 * (@perryrylance)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/)
 * Hi there,
 * Is there a way to programatically open a dialog?
 * I had a brief look at your repo and global variables but didn’t see anything 
   immediately obvious.
 * Kind regards
    – Perry

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9865225)
 * Dear [@perryrylance](https://wordpress.org/support/users/perryrylance/),
 * Please, follow the steps to open it programatically:
 * 1. Add the following code in the page content where the popup should appear, 
   to make the data load: [sg_popup id=”1″ event=”click”]<input type=”hidden”>[/
   sg_popup]
 * 2. To open the popup via javascript, you can do the following:
    var popupObj 
   = new SGPopup(); popupObj.popupOpenById(1)
 *  Thread Starter [perryrylance](https://wordpress.org/support/users/perryrylance/)
 * (@perryrylance)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9925355)
 * Hi there,
 * This code was working very well up until recently,
 * We haven’t changed anything in the page content, I’ve double checked the shortcode
   is still there in the format you advised:
 * [sg_popup id=”3″ event=”click”]<input type=’hidden’/>[/sg_popup]
 * However when the click listener fires and that code is called, I’m seeing
 * ReferenceError: SGPopup is not defined
 * Could you please advise?
 * Kind regards
    – Perry
 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9925452)
 * Dear [@perryrylance](https://wordpress.org/support/users/perryrylance/),
 * Could you, please, mention if you have made any changes on your site, like changing
   the theme or updating it, before this happened?
    Please, share a URL with the
   popup so we can check the issue live.
 *  Thread Starter [perryrylance](https://wordpress.org/support/users/perryrylance/)
 * (@perryrylance)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9925630)
 * Hi there
 * The site is regularly updated.
 * You can see the problem here: [https://www.tutorsaustralia.com.au/tutors-melbourne](https://www.tutorsaustralia.com.au/tutors-melbourne)
   by clicking on “Message Now”. That triggers this code:
 * var popupObj = new SGPopup();
 * Which is where the exception is thrown.
 * As I said, I’ve double checked the popup shortcode is there so I would expect
   this object to be available.
 * Please advise?
 * Kind regards
    – Perry
 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9925928)
 * Dear [@perryrylance](https://wordpress.org/support/users/perryrylance/),
 * We didn’t find any popup data here.
    Please, contact us via our Support email
   address so we can provide a direct support to you. Here: [support@popup-builder.com](https://wordpress.org/support/topic/programatically-open-dialog/support@popup-builder.com?output_format=md)
 *  Thread Starter [perryrylance](https://wordpress.org/support/users/perryrylance/)
 * (@perryrylance)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9926340)
 * Thank you, I’ll e-mail you shortly
 * Kind regards
    – Perry
 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9926349)
 * Dear [@perryrylance](https://wordpress.org/support/users/perryrylance/),
 * We’ll be happy to assist you! 😉
 *  Thread Starter [perryrylance](https://wordpress.org/support/users/perryrylance/)
 * (@perryrylance)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9930535)
 * Hi there,
 * We e-mailed the address you provided but the e-mail came back “Delivery incomplete”
 * The response was:
 * The recipient server did not accept our requests to connect. Learn more at [https://support.google.com/mail/answer/7720](https://support.google.com/mail/answer/7720)[
   mail.popup-builder.com. 195.201.18.10: generic::failed_precondition: connect 
   error (0): error]
 * Please advise?
 * Kind regards
    – Perry
 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9931859)
 * Dear [@perryrylance](https://wordpress.org/support/users/perryrylance/),
 * Please, contact us via the following form while we’re checking the email issue:
   
   [https://sygnoos.ladesk.com/submit_ticket](https://sygnoos.ladesk.com/submit_ticket)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Programatically open dialog’ is closed to new replies.

 * ![](https://ps.w.org/popup-builder/assets/icon-128x128.gif?rev=2698840)
 * [Popup Builder - Create highly converting, mobile friendly marketing popups.](https://wordpress.org/plugins/popup-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-builder/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/programatically-open-dialog/#post-9931859)
 * Status: resolved