User 6675636b20796f7521 User 6675636b20796f7521 - 4 months ago 31x
Javascript Question Button on click not firing using Jquery Modal Dialog

I have a div that is shown as a Modal dialog.

<div id="div2" style="display: none;" title="Upload Prenda">
<br />
Select File to Upload:
<asp:FileUpload ID="PrendaFileUpload" runat="server" Width="345px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="PrendaFileUpload"
ErrorMessage="File to be uploaded Required" ValidationGroup="X">*</asp:RequiredFieldValidator><br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
ShowSummary="False" ValidationGroup="X" />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<asp:Button ID="uploadButton" runat="server" Text="Upload" OnClick="uploadButton_Click"
Width="100px" />

here is the jquery for it

<script type="text/javascript">
$(function() {
$( "#div2" ).dialog({
autoOpen: false,
resizable: false,
height: 200,
width: 600
$( "#toggle" ).click(function() {
$( "#div2" ).dialog( "open" );

the problem is after i press the button to activate the
the method inside does not fire, any fix for this? sorry im just new in using jquery.


Well this is the answer that worked for me, im not using any update panel and this is what i used

adding this to the dialog declaration:

  open: function(type,data) {

found the answer in here so if you want to know more about click the link beside :)