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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:39:31+00:00 2026-05-25T14:39:31+00:00

i am using this demo: http://www.emblematiq.com/lab/niceforms/demo/v20/niceforms.html i would like to know how to be

  • 0

i am using this demo:

http://www.emblematiq.com/lab/niceforms/demo/v20/niceforms.html

i would like to know how to be able to add a datasource to this list:

<select size="4" name="languages[]" id="languages" multiple="multiple">

                    <option value="English">English</option>

                    <option value="French">French</option>

                    <option value="Spanish">Spanish</option>

                    <option value="Italian">Italian</option>

                    <option value="Chinese">Chinese</option>

                    <option value="Japanese">Japanese</option>

                    <option value="Russian">Russian</option>

                    <option value="Esperanto">Esperanto</option>

                </select>

i dont want to hard code the list i want to be able to attach it to a database or at least have a file from which it grabs these values. how would i do this? even something from the web.config file will do! thanks so much for any suggestions

jasper here is the complete code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Niceforms</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


    <link href="niceforms/niceforms-default.css" rel="stylesheet" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
    <script src="niceforms/niceforms.js" type="text/javascript"></script>
    <script>$(function () {
    $.get('file.txt', function (data) {
        var output = data.split(','),
            tmp = '';
        for (i = 0; i < output.length; i++) {
            tmp += '<option value=' + output[i] + '>' + output[i] + '</option>';
        }
        $('#languages').html(tmp);
    });
});
</script>
</head>



<body><div id="container">

<form action="vars.php" method="post" class="niceform">

    <fieldset>

        <legend>Personal Info</legend>

        <dl>

            <dt><label for="email">Email Address:</label></dt>

            <dd><input type="text" name="email" id="email" size="32" maxlength="128" /></dd>

        </dl>
        </fieldset>

    <fieldset>
        <legend>Personal Info</legend>

        <dl>

            <dt><label for="email">Email Address:</label></dt>

            <dd><input type="text" name="email" id="Text13" size="32" maxlength="128" /></dd>

        </dl>
        <dl>

            <dt><label for="email">Email Address:</label></dt>

            <dd><input type="text" name="email" id="Text12" size="32" maxlength="128" /></dd>

        </dl>

        <dl>

            <dt><label for="password">Password:</label></dt>

            <dd><input type="password" name="password" id="password" size="32" maxlength="32" /></dd>

        </dl>


        <dl>

            <dt><label for="gender">Gender:</label></dt>

            <dd>

                <select size="1" name="gender" id="gender">

                    <option value="Guy">Guy</option>

                    <option value="Girl">Girl</option>

                    <option value="Dude">Dude</option>

                    <option value="Chic">Chic</option>
                    <option value="Gentleman">Gentleman</option>

                    <option value="Lady">Lady</option>

                    <option value="Male">Male</option>

                    <option value="Female">Female</option>

                    <option value="Don't Ask">Don't Ask</option>

                </select>

            </dd>

        </dl>

        <dl>

            <dt><label for="dobMonth">Date of Birth:</label></dt>

            <dd>

                <select size="1" name="dobMonth" id="dobMonth">

                    <option value="Jan">Jan</option>

                    <option value="Feb">Feb</option>

                    <option value="Mar">Mar</option>

                    <option value="Apr">Apr</option>

                    <option value="May">May</option>

                    <option value="Jun">Jun</option>

                    <option value="Jul">Jul</option>

                    <option value="Aug">Aug</option>

                    <option value="Sep">Sep</option>

                    <option value="Oct">Oct</option>

                    <option value="Nov">Nov</option>

                    <option value="Dec">Dec</option>

                </select>

                <select size="1" name="dobDay" id="dobDay">

                    <option value="01">01</option>

                    <option value="02">02</option>

                    <option value="03">03</option>

                    <option value="04">04</option>

                    <option value="05">05</option>

                    <option value="06">06</option>

                    <option value="07">07</option>

                    <option value="08">08</option>

                    <option value="09">09</option>

                    <option value="10">10</option>

                    <option value="11">11</option>

                    <option value="12">12</option>

                    <option value="13">13</option>

                    <option value="14">14</option>

                    <option value="15">15</option>

                    <option value="16">16</option>

                    <option value="17">17</option>

                    <option value="18">18</option>

                    <option value="19">19</option>

                    <option value="20">20</option>

                    <option value="21">21</option>

                    <option value="22">22</option>

                    <option value="23">23</option>

                    <option value="24">24</option>

                    <option value="25">25</option>

                    <option value="26">26</option>

                    <option value="27">27</option>

                    <option value="28">28</option>

                    <option value="29">29</option>

                    <option value="30">30</option>

                    <option value="31">31</option>

                </select>

                <select size="1" name="dobYear" id="dobYear">

                    <option value="2000">2000</option>

                    <option value="1999">1999</option>

                    <option value="1998">1998</option>

                    <option value="1997">1997</option>

                    <option value="1996">1996</option>

                    <option value="1995">1995</option>

                    <option value="1994">1994</option>

                    <option value="1993">1993</option>

                    <option value="1992">1992</option>

                    <option value="1991">1991</option>

                    <option value="1990">1990</option>

                    <option value="1989">1989</option>

                    <option value="1988">1988</option>

                    <option value="1987">1987</option>

                    <option value="1986">1986</option>

                    <option value="1985">1985</option>

                    <option value="1984">1984</option>

                    <option value="1983">1983</option>

                    <option value="1982">1982</option>

                    <option value="1981">1981</option>

                    <option value="1980">1980</option>

                    <option value="1979">1979</option>

                    <option value="1978">1978</option>

                    <option value="1977">1977</option>

                    <option value="1976">1976</option>

                    <option value="1975">1975</option>

                    <option value="1974">1974</option>

                    <option value="1973">1973</option>

                    <option value="1972">1972</option>

                    <option value="1971">1971</option>

                    <option value="1970">1970</option>

                    <option value="1969">1969</option>

                    <option value="1968">1968</option>

                    <option value="1967">1967</option>

                    <option value="1966">1966</option>

                    <option value="1965">1965</option>

                    <option value="1964">1964</option>

                    <option value="1963">1963</option>

                    <option value="1962">1962</option>

                    <option value="1961">1961</option>

                    <option value="1960">1960</option>

                    <option value="1959">1959</option>

                    <option value="1958">1958</option>

                    <option value="1957">1957</option>

                    <option value="1956">1956</option>

                    <option value="1955">1955</option>

                    <option value="1954">1954</option>

                    <option value="1953">1953</option>

                    <option value="1952">1952</option>

                    <option value="1951">1951</option>

                    <option value="1950">1950</option>

                </select>

            </dd>

        </dl>

    </fieldset>

    <fieldset>

        <legend>Preferences</legend>

        <dl>

            <dt><label for="color">Favorite Color:</label></dt>

            <dd>

                <input type="radio" name="color" id="colorBlue" value="Blue" /><label for="colorBlue" class="opt">Blue</label>

                <input type="radio" name="color" id="colorRed" value="Red" /><label for="colorRed" class="opt">Red</label>

                <input type="radio" name="color" id="colorGreen" value="Green" /><label for="colorGreen" class="opt">Green</label>

            </dd>

        </dl>

        <dl>

            <dt><label for="interests">Interests:</label></dt>

            <dd>

                <input type="checkbox" name="interests[]" id="interestsNews" value="News" /><label for="interestsNews" class="opt">News</label>

                <input type="checkbox" name="interests[]" id="interestsSports" value="Sports" /><label for="interestsSports" class="opt">Sports</label>

                <input type="checkbox" name="interests[]" id="interestsEntertainment" value="Entertainment" /><label for="interestsEntertainment" class="opt">Entertainment</label>

                <input type="checkbox" name="interests[]" id="interestsCars" value="Cars" /><label for="interestsCars" class="opt">Automotive</label>

                <input type="checkbox" name="interests[]" id="interestsTechnology" value="Technology" /><label for="interestsTechnology" class="opt">Technology</label>

            </dd>

        </dl>

        <dl>

            <dt><label for="languages">Languages:</label></dt>

            <dd>

                <select size="4" name="languages[]" id="languages" multiple="multiple">


                </select>

            </dd>

        </dl>

    </fieldset>

    <fieldset>

        <legend>Comments</legend>

        <dl>

            <dt><label for="comments">Message:</label></dt>

            <dd><textarea name="comments" id="comments" rows="5" cols="60"></textarea></dd>

        </dl>

        <dl>

            <dt><label for="upload">Upload a File:</label></dt>

            <dd><input type="file" name="upload" id="upload" /></dd>

        </dl>

        <dl>

            <dt><label for="test">Sample Button:</label></dt>

            <dd><button type="button" name="test" id="test">I Do Nothing</button></dd>

        </dl>

    </fieldset>

    <fieldset class="action">

        <input type="submit" name="submit" id="submit" value="Submit" />

    </fieldset>

</form>

<p id="footer">Niceforms v.2.0<br />&copy;Lucian Slatineanu - <a href="http://www.emblematiq.com/">Emblematiq</a><br />Last update: Nov 13 2008</p>

</div></body>

</html>
  • 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-25T14:39:32+00:00Added an answer on May 25, 2026 at 2:39 pm

    You can use an external datasource pretty easily with jQuery. First you would need to setup a datasource. It could be an .asp page that draws information from a database, a text file, or really any other file you would like to use.

    –Datasource Output (Maybe just a text file that looks like this)–

    English,French,Spanish,Italian,Chinese,Japanese,Russian,Esperanto
    

    –jQuery code–

    $(function () {
        $.get('path_to/file.txt', function (data) {
            var output = data.split(','),
                tmp = '';
            for (i = 0; i < output.length; i++) {
                tmp += '<option value=' + output[i] + '>' + output[i] + '</option>';
            }
            $('#languages').html(tmp);
        });
    });
    

    The above code executes after the dom is ready ($(function () {) and uses an AJAX request. After the AJAX request comes back successful the data is split at the commas into an array, then that array is iterated through and a temporary variable (tmp) stores what you want to inject into the dom. After the for(){} loop runs the tmp variable is injected into the id="languages" select input.

    Here is a link to the jQuery documentation for the $.get() method: http://api.jquery.com/jQuery.get/

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

Sidebar

Related Questions

I'm using this ( http://www.j-download.com/demo/demo-j-dcontact.html ) form on my website. It works great but
I'm using this code to be able to generate an dynamic select: demo: http://www.erichynds.com/examples/jquery-related-selects
So I am using jquery.autocomplete.js, demo can be found here http://www.ajaxdaddy.com/demo-jquery-autocomplete.html I want to
I am using the localStorage in this demo here, http://help.arcgis.com/en/webapi/javascript/arcgis/demos/exp/exp_webstorage.html Basically it is a
Using this Jquery plug-in http://www.trirand.com/blog/jqgrid/jqgrid.html How do you: edit the cell content (looking at
well im using this script right here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ and I have a multiMonth plugin
I found this sliding panel script I like at http://www.webdesignerwall.com/demo/jquery/ , (#1 Sample Slide
I'm building something similar to this - http://www.impressivewebs.com/demo-files/content-switcher/content-switcher.html I wondered if anyone had any
I am using this plugin in Wordpress http://www.iwebix.de/front-slider-wordpress-plugin-demo/ As you can see in the
http://www.gmarwaha.com/jquery/jcarousellite/?#demo Hi, jcarousellite is a very nice jquery extension. I am using it for

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.