javascript - Load html file - and access element ID's -


I have loaded an html file and "kept" it in a single device:

  Document .getElementById ('my_div'). innerHTML = '& lt; Object type = "text / html" data = "table.html" & gt; & Lt; / object & gt; ';   

Works fine, but when I try to get an ID of it in the table (from table.html) I become empty / undefined.

  Var table = document.getElementById ('my_table'); / * No! * /   

I think I'm doing it at the wrong time or in some way. Can you help me

I have to do this with jQuery built-in AJAX method, .load () . Load ('/ filepath / table.html'); Var table = $ ('' ('/ my_div_id' #my_table '); // other code, possibly :)});

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -