
September 3rd, 2006, 11:39 PM
|
 |
eLearning Web Developer
|
|
Join Date: May 2004
Posts: 296

Time spent in forums: 6 Days 12 h 9 m 15 sec
Reputation Power: 10
|
|
Modify onClick set layer text to set div text
I have a function that will allow the text of a layer to be changed based on the click of a radio button:
PHP Code:
function MM_setTextOfLayer(objName,x,newText) {
if ((obj=MM_findObj(objName))!=null) with (obj)
if (document.layers) {document.write(unescape(newText)); document.close();}
else innerHTML = unescape(newText);
}
PHP Code:
<input name="1" type="radio" onClick="MM_setTextOfLayer('1','','Correct!')" value="Y" />
How would I change this to set the text of a <div> rather than a layer? Thanks!
|