Open dialog widget after page rendering #428
-
Kind of silly question, but I'm an outdated Primefaces programmer (used to work with version 8 years ago). I'm trying to open a dialog right after the page is completely rendered, but I'm getting this error:
The page code is this:
What is the best way to open a dialog right after page loads completely? This is only a pretest code, I'll perform other validations to check if the dialog must be opened or not. |
Beta Was this translation helpful? Give feedback.
Answered by
FlipWarthog
Nov 9, 2023
Replies: 1 comment 2 replies
-
I think you just need to wrap the js in jquery's document ready function to defer it: $( document ).ready(function() {
var widget = PF('wdialog1');
widget.show();
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
melloware
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you just need to wrap the js in jquery's document ready function to defer it: