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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:29:33+00:00 2026-06-04T13:29:33+00:00

Am having several boxes(more than 100) that will create dynamically with Now on each

  • 0

Am having several boxes(more than 100) that will create dynamically with

Now on each clicking of the box i should slide in one pop up box without page refresh.I downloaded jquery UI(http://jqueryui.com/demos/dialog/#option-position) and used in my project.Now I want to pass the company id on each click of the box to get the details from database.if I click window 5 the company id 5 should pass the get all the other details of the company inside the dialog.

jquery code:

<script type="text/javascript">
     // increase the default animation speed to exaggerate the effect
     $.fx.speeds._default = 1000;
     $(function () {

         $("#dialog").dialog({
             autoOpen: false,
             show: "slide",
             hide: "explode"
         });

         $("div[id *= 'window']").live('click', function (e) {

             $("#dialog").dialog("open");

             return false;
         });
     });
    </script>

Asp.net code

<div id="dialog" title="Basic dialog">
     <div><%#Eval("comp_name")%> </div>
      <div><%#Eval("comp_city")%> </div>
 </div>
  • 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-04T13:29:34+00:00Added an answer on June 4, 2026 at 1:29 pm
            $.fx.speeds._default = 1000;
            $(document).ready(function () {
                $("div[id*='window']").live('click', function (e) {
                    $.ajax({
                        url: 'YourUrl', type: 'Get', dataType: 'json',
                        data: { id: $(this).attr('id').replace(/window/g, '') },
                        success: function (data) {
                            $('<div></div>').appendTo('body').html('<div>' + data.comp_name + '</div><div>' + data.comp_city + '</div>').dialog({
                                modal: true, title: 'Test message', zIndex: 10000, autoOpen: true,
                                width: 460, height: 300, modal: true, resizable: false, closeOnEscape: false,
                                show: "slide", hide: "explode",
                                buttons: {
                                    Ok: function () {
                                        $(this).dialog("close");
                                    }
                                },
                                close: function (event, ui) {
                                    $(this).remove();
                                }
                            });
                        }
                    });
                });
            });
    

    your using asp.net mvc 3?

    $("div[id*='window']").live('click', function (e) {
                alert('Id : ' + $(this).attr('id') + '   ' + 'Replaced Id ' + $(this).attr('id').replace(/window/g, ''));
            });
    
    <div id="window1">
        Click Me1 !
    </div>
    <br />
    <div id="window2">
        Click Me2 !
    </div>
    <br />
    <div id="Div1">
        Click Me !. I am not window id.
    </div>
    <br />
    <div id="window3">
        Click Me3 !
    </div>
    

    fro live demo see this link: http://jsfiddle.net/nanoquantumtech/865Su/

    for replace method see refer this link: http://www.w3schools.com/jsref/jsref_replace.asp

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

Sidebar

Related Questions

Am having several boxes(more than 100) that will create dynamically with <div id=window5></div> <div
Am having several boxes(more than 100) that will create dynamically with <div id=window5></div> <div
I'm having several lists that are sortable and I can drag elements to each
When having several related projects (identifiable, stand alone applications, that share libraries), how do
I've a table with a more then 15 fields and having several relations. After
I'm having a problem with this query that takes several seconds to complete. I
I'm looking to write a fairly complex application that would involve having several base
I am trying to create a custom dialog box that displays an image in
I am working with a TabContainer having several different ContentPane children. Each of them
I have a directory containing hundreds of files (each having several chars). I want

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.