Hoang An
Hoang An

Reputation: 23

How to setup jquery ui dialog display

i have code in form

i'm user code :

$( ".screen-reader-response" ).dialog();

problems : when i'm don't submit any thing is: echo dialog with no content

how to setup:

if: no submit any thing: <div class="screen-reader-response"></div> no echo alert if: have submit: <div class="screen-reader-response" role="alert">My Content alert<div> echo alert My Content alert

give me any idea?

visit my site: http://www.graylinecruisehalong.net/ always dialog content when don't submit?

Upvotes: 0

Views: 71

Answers (1)

Viswanath Donthi
Viswanath Donthi

Reputation: 1821

When no submit:

$(".screen-reader-response").html("").dialog('open');

When submit:

$(".screen-reader-response").html("My Content alert").dialog('open');    

To initialize dialog with more options then please check the documentation of jquery dialog at: http://api.jqueryui.com/dialog/

Upvotes: 1

Related Questions