I'm adding the entire center section of the web page based upon what menu item was selected. The center sections are added like
$.get("biosketchStart_Select.html", function (data) {
$("#custom_data_container").html(data);
});
There are different html pages that are added in the same manner. Is it possible to add text to an input or add a row to a table from the main page after the page is added? Normally:
$('#bioTable').append('<tr id="bio-modal-' + obj.RecID + '"><td width="15%">Created</td><td width="15%">Last Update</td><td class="n" width="25%">' + obj.BiosketchName + '</td><td width="25%">' + obj.Category + '</td><td width="1%"></td><td><span class="underline"><a href="#/" onclick = "deleteBio(\'' + obj.BiosketchName + '\',' + obj.RecID + ')" >Delete</a></span><span class="word-spacing"><span class="underline"><a href="#/" onclick = "editBio(\'' + obj.RecID + '\')">Edit</a></span></span></td></tr>');
Will add a row to the bioTable as long as it is called from the same section of code.
The bioTable is created on the html page that is being added but the row needs to be added from the main page based upon the end users input. It this possible or do I need to create a Event Delegation? Can I call a plain javaScript function on the added html page using the Event Delegation process?
I looked at Event binding on dynamically created elements? and it is very close however I don't have any event that is firing on the added html page.
$('Document').on(eventName????, '#bioTable', function() {});
I understand using the above line of code but I don't have an event. It needs to show the added rows based upon the value of the main page and run automatically.