Full server-side programming to create a "light box" such that when a person clicks "Select" on a gridview item, I query my database for more information and display it in the light box.
What I'd like:
Something a little smoother looking, without a full postback if possible.
What I've tried:
Jquery UI Dialog object.
But, I can't even seem to get my foot in the door with this one!
<script type="text/javascript" src="/jquery/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/jquery/js/jquery-ui-1.8.7.custom.min.js"></script>
$(document).ready(function () {
var $dialog = $('<div></div>')
.html('This dialog will show every time!')
.dialog({
modal: true,
//autoOpen: false,
title: 'Basic Dialog',
buttons: {
Ok: function () {
$(this).dialog("close");
}
}
});
$('#btn_Open').onclick(function () {
$dialog.dialog('open');
// prevent the default action, e.g., following a link
return false;
});
});
The above works - kind of.
But as soon as I uncomment out the "autoOpen" so that it doesn't automatically open - clicking my button also stops opening the dialog box.
Once I get this working - my next 'requirement' will be figuring out how to make the .html portion dynamic such that it pulls the right information depending on what they've selected.
Any advice?
Thanks,

New Topic/Question
Reply



MultiQuote








|