JavaScript Checkbox text not visible checkbox text not visible c#

I have looked for possible roots of my issue but have been unable to do so.

I have some java Script that dynamically creates a list of check boxes. Some have text other have anchor links with text inside that.

It looks like this:

 createCheckbox: function (checkBoxDiv, sensorName, sensorId, checked, makeHyperLink, guid) {
        var liElement = document.createElement("li");
        var checkBoxElement = document.createElement("input");
        checkBoxElement.setType = "checkbox";
        checkBoxElement.name = "sensorName";
        checkBoxElement.id = "check" + sensorId;
        checkBoxElement.setAttribute("type", "checkbox");
        checkBoxElement.setAttribute("runat", "server");
        checkBoxElement.setAttribute("onchange", "OnCheckedChangedMethod('" + sensorName + "')");
        if (checked)
            checkBoxElement.setAttribute("checked", "true");
        if (makeHyperLink) {
            var linkElement = document.createElement("a");
            linkElement.setAttribute("style", "color:white;");
            linkElement.setAttribute("href", "#");
            linkElement.id = "link" + sensorId;
            linkElement.text = "" + sensorName;
            checkBoxElement.appendChild(linkElement);
        } else {
            checkBoxElement.setAttribute("text", sensorName);
        }
        liElement.appendChild(checkBoxElement);
        this.checkboxes++;
        return liElement;
}

This returns the element to be appended to my div.

It creates this list correctly and the HTML looks like this:

<ol id="sensorList"><li>
      Sensors
    </li><li><input id="check1" type="checkbox" name="sensorName" runat="server" onchange="OnCheckedChangedMethod('0-Predator Simulator (FLIR)')" checked="true"><a id="link1" style="color:white;" target='_blank' href="#">
      Item1
    </a></input></li><li><input id="check2" type="checkbox" name="sensorName" runat="server" onchange="OnCheckedChangedMethod('a')"><a id="link2" style="color:white;" target='_blank' href="#">
      Item2
    </a></input></li>
</ol>

The webpage looks like this:

enter image description here

I have tried removing all of my css incase it was something to do with that and nesting the text in other tags: <p> , <h1>but nothing changes.

Any thoughts on what the root of this problem might be. I am still fairly new to web programming.

Thanks

Answer:1

I am simply calling as window.location = '../MyController/MyAction?campId=' + campId + '&campName=' + campName; and in action am receiving it as [HttpGet] public ActionResult MyAction(int ...

I am simply calling as window.location = '../MyController/MyAction?campId=' + campId + '&campName=' + campName; and in action am receiving it as [HttpGet] public ActionResult MyAction(int ...

  1. parameter value missing for '-top'
  2. parameter missing value ssrs
  3. invalid_parameter_value missing required field size
  4. xst - parameter value missing for '-top'
  5. parameter is missing value
  6. required parameter 'value' is missing for event 'purchase'
  7. missing parameter value of type interface org.gradle.logging.styledtextoutputfactory
  8. missing parameter value for aura.tag
  9. missing parameter value of type interface org.gradle.internal.factory
  10. missing parameter value in crystal report
  11. report viewer parameter missing value
  12. ssrs hidden parameter missing value
  13. a parameter value is missing from the subscription
  14. missing parameter value error in crystal report

this is similar to my last question. sorry I don't know whether i could edit the same question. so here is my requirement. my HTML has the following part <ul class="products-grid"> <li ...

this is similar to my last question. sorry I don't know whether i could edit the same question. so here is my requirement. my HTML has the following part <ul class="products-grid"> <li ...

I have been trying to write a shared directive for my angular apps that turns an input field into jquery timepicker. I have two input fields, fromTime and toTime, and I want to update the toTime when ...

I have been trying to write a shared directive for my angular apps that turns an input field into jquery timepicker. I have two input fields, fromTime and toTime, and I want to update the toTime when ...

  1. angular directive data binding
  2. angular directive data
  3. angular directive data attribute
  4. angular directive data binding not working
  5. angular directive data change
  6. angular directive pass data
  7. angular directive async data
  8. angular directive get data attribute
  9. angular directive get data
  10. angular directive set data attribute
  11. angular directive send data to controller
  12. angular custom directive data binding
  13. angular update directive data
  14. angularjs data directive
  15. angular directive meta data
  16. angular directive wait for data
  17. angular directive loads before data
  18. angular directive with dynamic data
  19. angular refresh directive on data change
  20. angular directive wait for async data

This is the javascript for ajax html popup <script type="text/javascript"> $(document).ready(function() { $('.ajax-popup-link').magnificPopup({ type: 'ajax', overflowY: '...

This is the javascript for ajax html popup <script type="text/javascript"> $(document).ready(function() { $('.ajax-popup-link').magnificPopup({ type: 'ajax', overflowY: '...

  1. make function button excel
  2. make button function
  3. make button function as lever
  4. make button function javascript
  5. make button function in java
  6. how to make function button work
  7. how to make button function in android studio