I created a div to create a function, when u seals the value in the dropdown box, divs on length The number of will be created, therefore the code
and select The function is tested
function testing () {var result = get_id.options [get_id.selectedIndex] .value; If (results == 1) {var i = 0, c = model_details_json.com liberation, Jammu = c. Length, communication_dig = document.getElementById ("model_small"); If (j == 0) {alert ('nothing'); } (; I & lt; j; i ++) for {var communication = c [i]; Var create_div = document.createElement ('div'); Create_div.id = 'communication_id' + i; Create_div.name = 'Communications'; Var create_anchor = document.createElement ('a'); Create_anchor.innerHTML = communication.communication_name; Communications_div.appendChild (create_div); Document.getElementById (create_div.id) .appendChild (create_anchor); Create_anchor.setAttribute ("href", "javascript: zero (0);"); Create_anchor.setAttribute ("onclick", "sample ('+ communication.communication_name +', '' + create_div.name + '')"); For example, length 6 means that six numbers of the div are to be created, what is the problem, when I will click on the communication again in the selection dropdown, i.e. already six Devices are made, when it is done again, then six lights are made, then 12 giants are made completely, when it has to be done again, then this happens for 6 times ....... So what I want Div will not be repeated and it should be valid that the use
div elements in your donor dropdown Parents are considering div model_communication . You have to argue that the div exists and when you get the message like 'div, it is necessary to apply the loop to be executed already' as shown in the example.
To do this, create the div element with the ID
var newdiv = document.createElement ('div'); Newdiv.setAttribute ('id', id);
Comments
Post a Comment