Monday, March 20, 2017

update checkoff 1

// that ought to help ???

*

<div>
<input id="sns20170319su2217i" /> <a href="javascript:sns20170319su2217('get your list')" style="color: goldenrod; font-size: 1.5em;">get your list</a></div>
<div id="sns20170319su2217" style="color: goldenrod;"> // that ought to help
</div>
<script>

function sns20170319su2217(request) {

function thelink(thesymbol) {
var c = '<a href="javascript:sns20170319su2217(\'check ' + thesymbol + '\')"'
c = c + ' id="sns20170319su2217sym' + thesymbol + '" style="color:violet">'
c = c + ' ' + thesymbol + '</a>';return c}

function getyourlist() {
var thelist = document.getElementById("sns20170319su2217i")
var theframe = document.getElementById("sns20170319su2217")
var thelistarray = thelist.split(",")
var c = []
for (var i = 0; i < thelistarray.length; i = i + 1) {
c.push(thelink(thelistarray[i]))} // obvious mistake discovered !
theframe.innerHTML = c.toString()}

function check(symbol) {
var thelink = document.getElementById("sns20170319su2217sym" + symbol)
thelink.style.display = "none"}

if (request === "get your list") {getyourlist()} // !
if (request.split(" ")[0] === "check") {check(request.split(" ")[1])}


} // sns20170319su2217

</script>

<div style="color:pink">**</div>



*

No comments:

Post a Comment