Bear, Valli:
I tried the code below:
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Portfolio</title>
<SCRIPT language='JavaScript' charset='utf-8'> <!--
function callInit() {
var paramElement = document.createElement("param");
paramElement.setAttribute("id", "flash");
paramElement.setAttribute("name", "flashVars");
paramElement.setAttribute("value", "quoteShare=JAVA:3322"); //hard coded value for
testing
var objElement = document.getElementById("myPortfolio");
objElement.appendChild(paramElement);
var children = objElement.childNodes;
for (k=0; k<children.length; k++) {
alert(k+"=> id:"+children[k].id+"; name:"+children[k].name+"; value:"+children[k].value+"; tagName:"+children[k].tagName);
}
//I did see the <param id='flash' ...> was added under <object>. The loop shows 6 children. Three of them are "undefined". I'm not sure where are they from
objElement.loadQuotes();
}
// --> </SCRIPT>
</head>
<body scroll="yes">
<table>
<tr>
<td>
<div style="width:192px;height:310px;border:1px solid rgb(0, 0, 0);">
<table border="0">
<tr>
<td >
You may enter your own symbol and shares with correct format (e.g., IBM:100)
</td>
</tr>
<tr>
<td >
<textarea id="quoteShare" style="width:186px;font-weight:bold;font-size:11px;" rows="13" >
YHOO:200
JAVA:123
</textarea>
</td>
</tr>
<tr>
<td>
<button onclick="callInit()" type="button" style="color:#242F6D;font-weight:bold;font-size:10px;">Get Values of My Portfolio</button>
</td>
</tr>
</table>
</div>
<td>
<td>
<table border="0" >
<tr >
<td >
<object id="myPortfolio" type="application/x-shockwave-flash" data="MyPortfolio.swf" WIDTH="850" HEIGHT="460" >
<param id='param1' name='movie' value='MyPortfolio.swf'/>
<embed id='embed1' name='myPortfolio' src='MyPortfolio.swf' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' height='460' width='850'/>
</object>
</td>
</tr>
</table>
<td>
</tr>
</table>
</body>
</html>
The variable "quoteShare" was not passed to the swf object.