Wednesday, 15 February 2012

javascript - How do I get this code to work on google sites? -



javascript - How do I get this code to work on google sites? -

i have code:

var links = [cant set links in yet] var visited = []; var button = document.getelementbyid('btn'); button.addeventlistener('click', function() { if (visited.length == links.length) { alert('you visited links'); return; } var random, url; { random = math.floor(math.random() * 4); url = links[random]; } while (contains(visited, url)); alert('opening: ' + url + ' #' + random); visited.push(url); var win = window.open(url, '_blank'); win.focus(); }); function contains(array, value) { (var = 0; < array.length; i++) { if (array[i] == value) homecoming true; } homecoming false; }

and need combine , set on google site. tried combing tags in html box, create button. doesn't run script , open links... code not work on google sites or doing wrong?

full code w/html , css

on html box , can't. can utilize code app engine or utilize google app script.

you can see illustration here : http://tutorialzine.com/2011/01/google-appengine-series/

javascript google-sites

No comments:

Post a Comment