Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: inserting with DOM: applet won't instantiate

Message #1 by "Neethling, Dirk HTC/DE/EIC" <Dirk.Neethling2@h...> on Sun, 4 Mar 2001 00:11:56 +0100
	Hello,
	I'm using the DOM to insert some HTML in a user form. Amongst others
it inserts a little date applet which once inserted won't instantiate. Is
that because the applet needs to be loaded by the browser upon loading the
page, or are there other possibilities?

	Code:
					//date
					oNewNode 
document.createElement("TD");
					newRow.appendChild(oNewNode);
					oNewNode.style.width="10%";
					oNewNode.style.border="2 outset";
					oNewNode.style.background="#505050";
					oNewNode.color="#FFFFFF";

					oNewNode.nowrap = true;
					oNewChildNode 
document.createElement("INPUT");
					oNewChildNode.style.width="60px";
					oNewChildNode.style.height="18px";
					oNewChildNode.className="input";
	
oNewChildNode.name=tar+"innenschale_date-"+rows;
					var dateNowStr = new Date();
					dateNowStr = dateNowStr.getDate() +
"/" + (parseInt(dateNowStr.getMonth(),10)+parseInt(1,10)) + "/" +
dateNowStr.getFullYear();
					oNewChildNode.value=dateNowStr;
					oNewNode.appendChild(oNewChildNode);
					var sHTML = "";
						sHTML = "<applet
code=CalendarWidget.class id='DateApplet_"+rows + "' height='19'
style='FONT-SIZE: 1px; LEFT: 0px; TOP: 0px'
title='Eingabedatum:' width='12' ARCHIVE='DatePicker.jar' MAYSCRIPT
align='absbottom'>";
						sHTML += "<param
NAME='field' VALUE='"+tar+"innenschale_date-"+rows+"'>";
						sHTML += "<param
NAME='datemask' VALUE='dd/MM/yy'>";
						sHTML += "</APPLET>";
					(debugInfo==true)?alert("sHTML: " +
sHTML):debugInfo=false;
	
oNewNode.insertAdjacentHTML("beforeEnd", sHTML);	
	Thanx, Dirk

  Return to Index