• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

storing bullets in a variable

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a variable which I use to loop through checkboxes and on extract of each variable I want to use bullets.
eg :
  • Apple
  • Mango

  • and the code for looping is in seperate JS file. So how can I use html tags in my JS file.
     
    Ranch Hand
    Posts: 118
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Please TellTheDetails so we have a better chance to help you.
     
    michell rosvlet
    Greenhorn
    Posts: 23
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I have attached my code below. When my variable SelectedValue loops through a checked check box before attaching the value of check box I want it to put a bullet in it. So when I display the value of variable SelectedValue I want the user to see it as shown in the eg
  • Apple
  • Mango


  •  
    author
    Posts: 15385
    6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    you should avoid eval at all costs. It is BAD.

    Reference the element with the elements array:



    I also have no clue what getValue() is.

    I am not sure what you want to do with the bullets. How/Where are the bullets being displayed? That is part of your question he have no clue about.

    Eric


     
    Sheriff
    Posts: 67749
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    If you want elements to appear in a list, you need to construct a list and its child items.

    And, once again, you should avoid using veal like the plague. To fetch a reference to a variable whose name is computed, use something like: window[some-expression]
     
    michell rosvlet
    Greenhorn
    Posts: 23
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Sorry I was not able to understand constructing a list. Are you saying some like this
    <UL>
    <li>
    <li>
    <UL>


    And I will try to avoid EVAL.
     
    Bear Bibeault
    Sheriff
    Posts: 67749
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Yes. How else did you expect to be able to display the list?
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic