I got a small issue here.
I have a button in a form (this is not a submit button). I want to click this button, check a value in my form and if this value is empty, open a Dialog bow a previously declare.
The issue is : the Dialog element doesn’t want to be open.
So I ran some tests :
– I put the Dialog open outside the click event, it’s ok
– I put an alert instead of the Dialog open, it’s ok too
So this is my HTML :
<div id="popup_archive" style="display:none">
Veuillez saisir un temps effectif pour cette tâche avant son archivage.<br />
<input type="text" id="archive_temps_reel" />
</div>
...
<input type="text" size="50" name="temps_reel" />
...
<input id="btn_archiver" type="button" value="Archiver" class="a_bouton a_bouton_gris" />
And the jQuery one :
$(document).ready(function() {
// on click btn_archiver
$("#btn_archiver").click( function () {
if($('input[name="temps_reel"]').val() == '')
{
alert("coco");
$("#popup_archive").dialog("open");
}
});
// define popup_archive
$("#popup_archive").dialog({
autoOpen: false,
modal: true,
title: "Archivage"
});
});
Anyone can help me ?
Thank you !
Ok I found the “bug”. I uninstalled the jQuerify extension for FireBug, and my popup is ok. Don’t know why … Thanks for your answer, really helps me !