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

  • Home
  • SEARCH
  • 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 7763785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:44:46+00:00 2026-06-01T14:44:46+00:00

I’m working on an ASP.NET website (MVC3 but not really important for my question)

  • 0

I’m working on an ASP.NET website (MVC3 but not really important for my question)

I have some links on my page when the user clicks a link I want to open a Jquery Modal Dialog:

http://jqueryui.com/demos/dialog/#modal-message

for each link I want a different dialog to show.

As i understood I have to specify the content of the dialog in a <div> on my page. For example:

<div id="dialog" title="Basic dialog">
    <p>Here we put the content of the dialog</p>
</div>

Links are generated dynamically and I do not want to create a div for each link.
also the content of the dialog depends on parameters send by the link

I will try to explain what I want.

What I want is to do the following if possible:

I have one div

<div id="dialog" title="Basic dialog">
</div>

when the user clicks on link1 a function is called ShowDialog(FirstName1, LastName1)

that function will add the parameters as string to the div “dialog” and open the dialog.

when the user clicks on link2 the ‘div’ “dialog” is cleared and new content are filled by the function ShowDialog(FirstName2, LastName2)and the dialog is opened.

all should be done is Jquery or Javascript.

I hope I was clear. if more info is needed please ask.

  • 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-01T14:44:47+00:00Added an answer on June 1, 2026 at 2:44 pm

    You haven’t specified where you will be retrieveing the firstname and surname values from, so I’ve assigned them to data-* attributes of the link, like this:

    <a href="#" data-firstname="Foo" data-surname="Bar">Click me</a>
    
    $("#dialog").dialog({ /* settings */ });
    
    $("#link2").click(function() {
        var $el = $(this);
        var fn = $el.data("firstname");
        var sn = $el.data("surname");
        ShowDialog(fn, sn);
    });
    
    function ShowDialog(firstname, surname) {
        // Here you can do whatever is required to the dialog, create elements, change text, go nuts.
        $("p", "#dialog").text("Hello " + firstname + " " + surname); 
    
        // Show the dialog
        $("#dialog").dialog('open');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't

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.