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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:54:58+00:00 2026-06-02T14:54:58+00:00

hi i need to pass the selected dropdown list value to the jqueryui dialog

  • 0

hi i need to pass the selected dropdown list value to the jqueryui dialog box , when the user clicks on the link, for instance ,
if the use user selects product one and click the link , the dialog box should popup displaying product 1 selected, I can display the dialog box:

<script>
    $(document).ready({
     $('a.login').click(function(){

        $( "#dialog:ui-dialog" ).dialog( "destroy" );

        $( "#product" ).dialog({
            height: 140,
            modal: true
        });
    });
    </script>

 <div class="login-homepage">
    <asp:DropDownList ID="DropDownList1" runat="server">
    <asp:ListItem Text="product1" Value="product1">Camera</asp:ListItem>
    <asp:ListItem Text="product2" Value="product2">DVD</asp:ListItem>
    <asp:ListItem Text="product3" Value="product3">LCD</asp:ListItem>
    </asp:DropDownList>
 <a href="#" id="login">login</a>
<div id="product" title="product-container">
    //show the selected dropdownlist
</div> 

The issue is i am not able to
pass the selected value of dropdown list, I tried using ajax json to pass it with no success due to lack of knowledge,
Can anyone assist me or provide any suggestions on how to work this out.

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-06-02T14:55:04+00:00Added an answer on June 2, 2026 at 2:55 pm

    I guess you want to pass the selected value from the dropdown to another server page using ajax and get the response and show that in the Dialog. This is how i will do that.

    $(function(){
    
     $('a.login').click(function(){
    
         var selectedVal=$("#DropDownList1").val();
         var url="myserverpage.aspx?product="+selectedVal;
    
            var dialog = $("#dialog");
            if ($("#dialog").length == 0) {
                dialog = $('<div id="dialog" style="display:hidden"></div>').appendTo('body');
            }
            dialog.load(
                url,
                {}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object
                function (responseText, textStatus, XMLHttpRequest) {
                    dialog.dialog({                       
                        close: function (event, ui) {                            
                            dialog.remove();
                        },
                        modal: true,
                        width: 460
                    });
                }
            );
        }); 
    
    });
    

    And In myserverpage.aspx, Read the value from querystring product and return the relevant HTML markup you want to show to the user in the dialog. It will work if you have jQuery and jQuery UI loaded to your page properly.

    The script will create a div for the popup itself on the fly. You don’t need to add one page for that.

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

Sidebar

Related Questions

I need to pass the value of on of the selected item in the
Am trying to pass the selected check box value to the control function. Please
I need to render a DropDown list and I don't want to pass list's
I need to pass a variable in dispatcher tag... for instance var google:EventName =
I have a simple dropdown box and jquery to get value from what i
I need to pass some selected text in vim to a curl command as
Situation is : when i select a value from a html.dropdown then i need
I need to pass back a enum value in perl, how can I do
I'm having some issues with a drop-down list where I need to pass the
I am writing a Chrome extension and I need to pass in the value

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.