Sandboxing of alert() function in JQuery?

  • lateralplains
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0

lateralplains created the topic: Sandboxing of alert() function in JQuery?

Hi all,

I continue to work happily with Breezing Forms. The depth of this amazing toolbox has only just been scratched.

I have run into a very minor glitch. I have successfully implemented a custom Submit button which saves the entries into the forms before final submission. The code was provided in the Crosstec forums thus:
JQuery.ajax({
          type: "POST",
          url: JQuery(element).closest("form").attr("action"),
          data: JQuery(element).closest("form").serialize(),
          success: function(data)
          {
              alert("Your entries have been saved"); // possible pop-up confirmation
          }
        });

And yes I did put this in an cation script between the code framework tags :-)

It functions as it should and successfully submits the data. But the alert() function fails with this error:
Ignored call to 'alert()'. The document is sandboxed, and the 'allow-modals' keyword is not set./code] This is a bit weird, as the it works fine in both Preview and Site Preview mode "Next" button successfully throws up a focussed popup listing incomplete fields. Whilst its not a huge issue, its an annoying one. I am sure I have done something wrong but cannot find the source. Any suggestions gratefully received. Cheers and thanks again George[code]Ignored call to 'alert()'. The document is sandboxed, and the 'allow-modals' keyword is not set./code]

This is a bit weird, as the it works fine in both Preview and Site Preview mode "Next" button successfully throws up a focussed popup listing incomplete fields.

Whilst its not a huge issue, its an annoying one. I am sure I have done something wrong but cannot find the source. Any suggestions gratefully received.

Cheers and thanks again
George
#233695
  • Posts: 5591
  • Karma: 118
  • Thank you received: 512

MarioPuco replied the topic: Sandboxing of alert() function in JQuery?

George,

As I'm sure that you googled this problem already this is what I found :

stackoverflow.com/questions/32119446/ign...the-allow-modals-key

"To allow alert popups you will need to find the iframe tag, and modify the sandbox attribute to contain the allow-modals value"

Can you look into this ?

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#233703
The following user(s) said Thank You: lateralplains
  • Posts: 5591
  • Karma: 118
  • Thank you received: 512

MarioPuco replied the topic: Sandboxing of alert() function in JQuery?

@lateralplains

Make sure to let me know how it goes.
Waiting for your feedback.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#233708
Moderators: ForumSupporttomeperica
Time to create page: 0.077 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here