|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by alcani in JScript, JavaScript, Web Languages/Standards
Hi,
I'm looking a similar way to insert information inside a DIV tag
(like
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_22119101.html).
However instead of simple text, I would like a JS function.
PD. The attached code inserts literally the code
Thank you for you help
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
function ingreso(){
var codigo = " <script type=\"text/javascript\"> <!-- ";
codigo += " st_siteroot=\"file:///P|\"; ";
codigo += " st_jspath=\"/protocolus/menu/menu-protocolus.js\"; ";
codigo += " if(!window.location.href.indexOf(\"file:\") && st_jspath.charAt(0)==\"/\") ";
codigo += " document.write('<script type=\"text/javascript\" src=\"'+st_siteroot+st_jspath+'\"><\/script>'); ";
codigo += " else ";
codigo += " document.write('<script type=\"text/javascript\" src=\"'+st_jspath+'\"><\/script>'); ";
codigo += " //--> </script> ";
var myText = document.createTextNode(codigo);
document.getElementById("encabezado").appendChild(myText);
}
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625