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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:21:46+00:00 2026-06-12T21:21:46+00:00

I have been given this code by the ui designer and I dont know

  • 0

I have been given this code by the ui designer and I dont know how to post the
selected source array data to a php script so I can query it with MySQL, I am sorry I
a beginner with JQuery, I would like to query the array like in a form option select style, or would it be better to use an associative array?

<div id='content'>
  <script type="text/javascript">
    $(document).ready(function () {
        var source = [
            "Select Your location",
            "North London",
            "South London",
            "West London",
            "East London",
            "City of London",  
        ];

        // Create a jqxDropDownList  
        $("#jqxDropDownList").jqxDropDownList({ 
            source: source,    
            selectedIndex: 0, 
            width:   '250px', 
            height: '35px', 
            theme: 'summer' 
        });
    });
</script>
<div id='jqxDropDownList'>
  • 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-12T21:21:47+00:00Added an answer on June 12, 2026 at 9:21 pm

    If you need to just use this fancy dropdown as normal dropdown, here is the example (no need for ajax):

    <html>
    <head>
    
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    
        <script type="text/javascript" src="jqwidgets/jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="jqwidgets/jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="jqwidgets/jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="jqwidgets/jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="jqwidgets/jqwidgets/jqxdropdownlist.js"></script>
    
    </head>
    <body>
    <div id='content'>
      <script type="text/javascript">
        $(document).ready(function () {
            var source = [
                "Select Your location",
                "North London",
                "South London",
                "West London",
                "East London",
                "City of London",  
            ];
    
            // Create a jqxDropDownList  
            $("#jqxDropDownList").jqxDropDownList({ 
                source: source,    
                selectedIndex: 0, 
                width:   '250px', 
                height: '35px', 
                theme: 'summer' 
            });
    
            $('#jqxDropDownList').bind('select', function (event) { 
                $('#location').val($("#jqxDropDownList").jqxDropDownList('getSelectedItem').label);        
            });
    
        });
    
    
    </script>
    <div id='jqxDropDownList'></div>
    
    <form>
    <input type="text" id="location" name="location" value="not selected" />
    <input type="submit" value="selected!">
    </form>
    
    <div><?php if (isset($_GET['location'])) print('You selected: '.$_GET['location']); ?></div>
    
    </div>
    </body>
    </html>
    
    1. Download and use jqwidgets library.
    2. Bind a select event to jqwidgets dropdown, which puts selected value to normal (hidden) form element.
    3. Submit and use in PHP as normal submitted value

    More information: JQWidgets dropdown homepage

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

Sidebar

Related Questions

I was given this bit of Scheme code, and have been tasked with translating
I have been given this JavaScript script to restrict max file size before it
Given that I have this resultset structure (superfluous fields have been stripped) Id |
I have been struggling with this for a while now. given a set of
I have been given some poorly formatted data and need to pull numbers out
I have been given the below .NET question in an interview. I don’t know
I have been given an SWF to edit a link in the AS code.
I've been given this code to utilize to test out, and verify if email
I have been given an end of term project to write an assembly code
I have been given the following code that should perform an ssl handshake and

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.