Calling primefaces dialog using external javascript

Posted: November 18, 2013 in web

You can see this “” on inspect element if you just put; after on ready.

exernal js

$(function() {'Dialog', 'modalAdDialog', {
		id : 'login-page:modalDialog',
		modal : true,
		width : 450,
		height : 100
	$('body').append('<div class="ui-widget-overlay" style="width: '+$(window).width()+'px; height: '+$(window).height()+'px; z-index: 1000;"></div>');  //this is for the modal overlay


<p:dialog id="modalDialog" width="450" header="Mobile App"
				widgetVar="modalAdDialog" modal="true" height="100">
					some text
<p:commandButton type="button"
					value="No Thanks" />

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s