ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
awe.open() doesn't work, error on open
Title:
B
I
{code}
?
Hello, popup initialised like this: @(Html.Awe() .InitPopup() .Name("Acquired") .Url(Url.Action("Acquired")) .Title("DOWNLOADED QR") .Mod(o => o.OutClickClose())) when it called from onclick, like this: <button type="button" class="awe-btn" onclick="awe.open('Acquired')">Open Popup</button> all works like a charm. When popup is called from javascript: $(window).on('load', function () { awe.open('Acquired'); }); it doesn't appear and browser console shows this error: AwesomeMvc.js:1 Uncaught TypeError: Cannot set properties of undefined (setting 'id') at Object.open (AwesomeMvc.js:1:46948) at Index:184:13 at dispatch (jquery-3.6.1.js:5430:27) at elemData.handle (jquery-3.6.1.js:5234:28) Thank you.
Save Changes
Cancel
Vladimir Kerzhentsev
asked at 16 Nov 2022
you're probably calling it before it was initialized, try `$(function(){ awe.open('Acquired')});` instead of `on('load')`
at 16 Nov 2022
Omu
You are helped, as usually. Thank you.
at 16 Nov 2022
Vladimir Kerzhentsev
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK