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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:10:45+00:00 2026-05-28T18:10:45+00:00

I just ran into a problem where i am converting a select into <ul><li/></ul>

  • 0

I just ran into a problem where i am converting a select into <ul><li/></ul> format.

Now i take all the options, their values, html and classes and turn them into li.

That means the li get value attributes etc.

The problem at hand
It works perfectly fine when the options have integers (currently below 4 digits) and convert them. But i have another one where the select options have guids as values. When i try transform that all the values in the become zero i.e. value=”0″.

Does anyone have any ideas?

My code exactly:

//Extract listbox
        $preferenceListBox.children().each(function () {
            var $liToAdd = $liTemplate.clone();
            console.log($(this).val());
            $liToAdd.html($(this).html()).prop("value",$(this).val()).prop("disabled", $(this).prop("disabled"));
            if ($(this).is("[disabled='disabled']") || $(this).is("[selected='selected']")) {
                $liToAdd.addClass("disabled");
            }
            if ($(this).filter(":selected") > 0) {
                $liToAdd.prop("disabled", "disabled");
            }
            $selectionList.append($liToAdd);

        });

Update

Sample of converted list html:

<ul class="selectionList"><li value="0" class="ui-draggable ui-selectable">-Select-<b class="preferenceButton">+</b></li><li value="0" class="ui-draggable ui-selectable">Canberra Central<b class="preferenceButton">+</b></li>...</ul>

It was created from this select:

<select class="preferenceListBox noSelectItem" id="areaCodeList" multiple="multiple" name="areaCodeList" size="7" style="display: none; "><option disabled="disabled" class="disabled">-Select-</option><option value="24631a28-901d-4156-b6f6-2d2b3c10c9ec">Canberra Central</option>...</select>
  • 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-28T18:10:46+00:00Added an answer on May 28, 2026 at 6:10 pm

    Hmm…

    http://www.w3schools.com/tags/att_li_value.asp

    http://www.w3schools.com/tags/tag_li.asp

    The value attribute of <li> is deprecated in HTML 4.01.

    The value attribute sets the value of a list item. The following list
    items will increment from that number.

    The value must be a number and can only be used in ordered lists
    (<ol>).

    The value attribute of <li> is not supported in HTML 4.01 Strict /
    XHTML 1.0 Strict DTD.

    ps: did you think about using id or class attribute instead of value?

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

Sidebar

Related Questions

Thanks for all the help so far, now I just ran into a major
I just ran into a problem with the version of JAX-WS in JDK 1.6.0
Ok, so I just ran into the following problem that raised an eyebrow. For
I just ran into a problem. I know these integers, $integers : 3,5,15,20. I
I just ran into an annoying problem. Suddenly Avira AntiVir started to flag one
I just started working with OpenGL, but I ran into a problem after implementing
I just started learning Ruby and I ran into a problem today. numResults =
I just ran into a problem when I need to do a goto into
I have a mapView with custom annotations and just ran into a problem on
I just started with Scala and ran into a problem: Scala has the Types

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.