css style isn't showing up for buttons when using innerhtml
Hi,
I am having trouble injecting radio inputs into a div element. The css style for the radio buttons are like the native style.
The div i am trying to insert to is "
NotesDiv".
This is my code, using asp to fetch the dynamic elements for the radio buttons:
- document.getElementById("NotesDiv").innerHTML = "";
- str = "<p class=\"sticky\" style=\"width: 75%;\">";
- <%Dim k
- For k=0 to countNotes-1 step 1%>
-
- str += "<input type=\"radio\" name=\"MyNote\" id=\"Notes<%=NotesResult(2,k)%>\" onClick=\"viewNote()\" value=\"<%=NotesResult(2,k)%>\"><%=NotesResult(0,k)%> </input>"
- str += "(written by <%=NotesResult(1,k)%> at <%=NotesResult(3,k)%> )</br>"
- <% Next %>
- str+="</div>";
- document.getElementById("NotesDiv").innerHTML = str;