Quantcast
Viewing latest article 24
Browse Latest Browse All 42

Answer by Ali Khalid for Execute javascript on page load but not on button click

Try this:

<script type="text/javascript">function getFlashMovie(movieName) {    var isIE = navigator.appName.indexOf("Microsoft") != -1;    return (isIE) ? window[movieName] : document[movieName];}function start() {    var active = document.getElementById("buttonstart").value == "stop";    getFlashMovie("test").setProperty("src",  !active ? document.getElementById('url2').value: null);    document.getElementById("start").value = active ? "buttonstart" : "buttonstop";}start(); //added this</script>

Viewing latest article 24
Browse Latest Browse All 42

Trending Articles