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 4060528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:20:57+00:00 2026-05-20T15:20:57+00:00

I am currently working on a website and I want to create a modal

  • 0

I am currently working on a website and I want to create a modal popup window in JavaScript. The problem is, I want to pull the contents of the window from a separate .html file and not from a hidden div on the page (this is how most of the examples I have seen show you how to do it).

I would really appreciate if someone could point me in the right direction on how to implement this.

Thanks in advance

Matt D

  • 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-05-20T15:20:58+00:00Added an answer on May 20, 2026 at 3:20 pm

    If using jQuery (which you should)

    var div = $('#myid');  // container for the content
    
    $.get(url)                      // get the content
     .success(function(resp) {      // on success
       $(div)
          .html(resp)               // populate the div
          .dialog({ modal: true }); // and turn it into a dialog
     });
    

    NB: this example uses jQuery 1.5’s new “deferred” syntax. If using an earlier function pass the handler as a parameter to $.get as appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on an aspx website. I want to create a clone of
I'm currently working on an ASP.NET Website where I want to retrieve data from
I am currently working on a website that will have a high volume of
I am currently working on a website which lists the businesses as per either
I'm currently working on a website for my church's college group, and am started
I'm currently working on a website for a client and I'm getting a strange
I'm currently working on a website in PHP, and I'm wondering what the best
I am currently working on a website that requires the ability to overwrite the
Currently working with NSURLConnection. Found a great website showing important delegate methods coming with
For a website I'm currently working on we're redirecting our old URL's permanently to

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.