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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:19:51+00:00 2026-06-14T03:19:51+00:00

I have succeeded in opening a html page in a jQuery dialogbox. I have

  • 0

I have succeeded in opening a html page in a jQuery dialogbox. I have also passed a data called ‘vendorid’ to it, but do not know how to retrieve it in the html page that opens.

            $('#btnShowSupplierStats').click(function () {
            showUrlInDialog('../supplierstats.htm?vendorId=' + $(this).attr('vendorId')); return false;
            //showUrlInDialog('../Default2.aspx'); return false;
        });

        function showUrlInDialog(url) {
            var vid = $(this).attr('vendorId')
            var tag = $("<div id='statsDiv' vid ='"+ vid +"'></div>");
            $.ajax({
                url: url,
                success: function (data) {
                    tag.html(data).dialog({ show: "fadein", hide: "fadeout",
                    modal: true, minHeight: 550, minWidth: 800, autoOpen: false,
                    close: function (event, ui) { $(this).remove(); }, buttons: [{
                    text: "Close", click: function () { $(this).dialog('close'); 
                    return false; } }] }).data("vendorid", vid).dialog('open'); 
                    return false;
                }
            });
        }

UPDATE: The answer from Farrukh would do this job ( i.e. second option he mentioned, since I am using a 100% client-side approach). But I did not store the data to be passed in a hiddent field. Instead I used the following approach which also works always:

  1. When you are about to open the dialog through jQuery, just before this, set the attribute for the button which is the opener of dialog. In my case, I set an attribute called ‘vendorid’ on this button. Let’s say the id of the opener button is ‘btnOpenVendorDialog’. So need to use the following code.

    $(‘#btnOpenVendorDialog’).attr(‘vendorid’, ‘Vendor1234’);
    //open your dialog here ….

2.Then, in the html page that opens in dialog window, I can easily retrieve this attribute without any problems.

var vid = $('#btnOpenVendorDialog').attr('vendorid');

THAT’s IT. YOU ARE ALL READY TO do whatever you want with this passed data.

  • 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-14T03:19:52+00:00Added an answer on June 14, 2026 at 3:19 am

    There are two ways to do this:

    1. Use server side and get the passed data in post or get(in your case vendor ID is get) and use it to populate a hidden element or data-vendorID attribute of any available element.
    2. If you are using javascript then data vendorID that you have passed as vid is available after success function so place it in as a hidden input field or place it as a data-vendor-id on one of the other DOM elements and access it from there.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to import html table data to an excel file and have succeeded
I need to know if all the client-side validator checks have succeeded, or if
I am trying to do the following and I have not yet succeeded. I
I succeeded in opening hierarchy viewer from tools directory. I have two emulators running
So far, I have succeeded to authenticate my app. Now I want to know
I am using Openlayers to my application. i have succeeded in showing marker when
I am trying to create a windows explorer. I have succeeded in populating the
I have just succeeded in creating oAuth authentication for my twitter application using PHP.
I have followed the tutorial for getting a Thunderbird extention going and succeeded in
I have an XML structure that looks like: <Succeeded p1:type=Edm.Boolean xmlns:p1=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata xmlns=http://schemas.microsoft.com/ado/2007/08/dataservices>false</Succeeded> Since I

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.