Reputation: 23
i have code in form
<div class="screen-reader-response"></div>
<div class="screen-reader-response" role="alert">My Content alert<div>
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
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