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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:22:47+00:00 2026-05-21T22:22:47+00:00

I have index page with a list of users and an edit link. When

  • 0

I have index page with a list of users and an edit link. When I click this link I wold like to open a jquery dialog to edit and then save.

I am doing an ajax get on another view and loading the return data into a div. The return data is html and javascript both. The return is just text essentially. I need the javascript in the return to be executed, sort of like running eval. Is this possible or is there a better way to do it? I guess I could just open it in a window.open or an iframe. However I was wondering if jquery dialog or any other model dialog solution is possible? Is there a recommended way?

   $.ajax({
                type: "GET",
            url:  "/User/Edit/" + user.Id,
            cache: false,
            dataType: 'html',
            error: function (xmlHttpRequest) {                  
                $("#edit-dialog").html(xmlHttpRequest.responseText);
            },
            success: function (data) {
                $("#edit-dialog").html(data);                   
                $("#edit-dialog").dialog("open");
            }             
        });

The page edit is more than just a simple form – it has reasonable amount of javascript and ui candy. Thanks!

  • 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-21T22:22:47+00:00Added an answer on May 21, 2026 at 10:22 pm

    Inline JavaScript should be executed as soon as the browser renders it. I think the problem is you are using document.ready to initialize, but this will never fire if you add the HTML after initial page rendering. 2nd, all JavaScript has to come after HTML, because JS will not find HTML elements.

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

Sidebar

Related Questions

At page index.htm, I have this list: <ul id=topic> <li id=1>Thing1.</li> <li id=2>Thing2.</li> </ul>
I want to have the users index page to list the admin and normal
I have an index page with three links as follws. When I click the
i try to solve a problem. i have an index page and users enter
I have my index page which posts a single entry instead of the usual
I have an index page index.php , and when the user clicks on a
Situation: I have an index page which loads pages into it with ajax as
At current i have an index page which shows values from an XML page
I have a directory on my webserver. It does not have an index page.
I have a index.php page that is the main page. All pages are included

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.