Hi,
Two quick questions:
1 I want to update the content of a div tag so I wrote the function:
[code]
function updateInnerHTML(theControl, theHTML) {
var newdiv = document.createElement(“div”);
newdiv.innerHTML = theHTML
var container = document.getElementById(theControl);
container.appendChild(newdiv);
//container.innerHTML(theHTML);
The call to innerHTML didn’t work so I changed it to appendChild which is not the solution I want. Can anyone tell me why the innerHTML function wouldn’t work? I was passing in a short text string with no formatting.
2 I want to put my java functions in a seperate .js file and call them from my aspx file. I added the line:
[code]
<script type=”text/javascript” src=”JScript.js”>
to the aspx file’s <head>. Is there anything else I need to do to call the functions in the js file?
Thanks to anyone who can help. I am totally new to javascript.