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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:42:14+00:00 2026-05-26T22:42:14+00:00

I am using the jQueryUI dialog widget in a website I’m developing. Basically, the

  • 0

I am using the jQueryUI dialog widget in a website I’m developing. Basically, the page lists a list of friends and a link to send a message to each. Here’s a snippet of the html.

...
<td><?php echo $realname; ?></td>
<td><?php echo $username; ?></td>
<td><a href="#" id="opener">Send Message</a></td>
...

My javascript looks like:

$(document).ready(function() {
 var $dialog = $('#dialog')
  .dialog({
   autoOpen: false,
   resizable: false,
   modal: true,
   height: 350,
   dialogClass: 'no-close',
   draggable: false
 });
 $("#opener").click(function() {
   $dialog.dialog('open');
   return false;
 });
 $('#closedialog').click(function() {
   $dialog.dialog("close");
   return false;
 });
});

And lastly, at the bottom of my html, it goes:

<div id="dialog" title="Send a message"><form action="<?php echo $currURL; ?>">
 <p>To: {would want for something like "RealName (username)" to appear here}</p>
  <div align="center">
  <textarea cols="40" rows="10"></textarea>
  </div>
 <p align="right"><span class="button" style="text-align: right;">
  <input type="submit" value="Submit" /><button id="closedialog">Cancel</button>
 </span></p>
</form></div>

Let’s say the first person on your friends list is John Smith (johnsmith) and the next one is Jane Smith (janesmith). Would it be possible to pass the values of $realname and $username just for that table row so it would be printed out as well in the jQuery dialog widget? – Or – Do you have suggestions on how to do this better/efficiently?

  • 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-26T22:42:15+00:00Added an answer on May 26, 2026 at 10:42 pm
    • Put some place-holders in your dialog, find them and store a reference to them.
    • Change your id="opener" to class="opener"
    • Whenever a .opener link is clicked, look in the TDs around it for the values you’re after and write them into your referenced place-holders

    Demo
    http://jsfiddle.net/uHXbV/5/

    This could be further enhanced by using data- attrs or something similar, but the demo has as little as possible impact on the original code in order to keep it easy to understand.

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

Sidebar

Related Questions

I am using JQueryUI tabs to display a number of lists. Each list is
I'm using jqueryUI's widget factory to extend jqUI's dialog widget. I've setup the simplest
I am trying to create popup using the jqueryui dialog. I am trying to
To give more information I am using the modular form here: http://jqueryui.com/demos/dialog/#modal-form `b(e.target).zIndex` is
I am developing an application using jQueryUI. I am also using the Themeroller. I
I am using the JQUeryUI to present a Dialog Box to the end user
I am using jquery UI's dialog widget to render a modal dialog in my
I would like to mimic a standard JavaScript confirm() using a jQueryUI dialog. I
I am using the jquery dialog widget to display a modal box. However when
I am using JQueryUI Dialog and created this function below: <script> $(document).ready(function() { $('#dialog').dialog({

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.