Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:45:52+00:00 2026-06-12T01:45:52+00:00

I am trying to get a link to display a div in a popup.

  • 0

I am trying to get a link to display a div in a popup.

This my my link:

<li><a class="newAttachmentType" onclick="getFiles(true)">Move to somewhere</a></li>

and this is the div I am trying to call and put into a popup:

<div id="ddlFiles">
    <label>
        Select new CaseFile:</label>
    <asp:DropDownList runat="server" ID="ddlCaseFilesNew" DataSourceID="dsCaseFiles"
        DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="300px" />
    <label>
        Select old CaseFile:</label>
    <asp:DropDownList runat="server" ID="ddlCaseFilesOld" DataSourceID="dsCaseFiles"
        DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="300px" />
</div>

This is what I have tried so far in the “getFiles()”:

$('.newAttachmentType').click(function () {
   $('#newAttachmentDialog').dialog({
       autoOpen: true,
       height: 'auto',
       width: 'auto',
       modal: true,
       buttons: {
         "Save": function () {
            var attachmentName = $('#txtNewAttachmentName').val();
            if (attachmentName != "") {
                 var res;
                 PageMethods.addNewAttachmentType(attachmentName, reloadAttachmentTypes, res);
                 $(this).dialog('close');
            }
      },
      Cancel: function () {
            $(this).dialog('close');
      }
   },
   beforeClose: function () { $('#txtNewAttachmentName').val(''); }
 });
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:45:54+00:00Added an answer on June 12, 2026 at 1:45 am

    You are assigning the click handler inside of your onclick method. Which is too late to have any effect.

    Instead of assigning a click handler like that, just execute the code directly. Basically unwrap the inner function:

    $('#newAttachmentDialog').dialog({ 
       //Your code
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error when trying to link a win32 exe project. I have
I am trying to display a hidden div in colorbox using an <a> link's
i have a page at this link and im trying to get the test
I am trying to get a link to open a iframe on the current
I am trying to get it so that when a link is clicked in
I am trying to build a VC++ project and I get these LINK errors:
I am trying to change the background image of a link when it get
So i am trying get 2 div-containers which both should contain centered text (Both
I was trying to get my div that contains floating elements, to enlarge to
Hello I'm trying to get a multicolumn display (if it can be called so)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.