Jump to content

Search the Community

Showing results for tags 'embedded javascript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. 1. I have some HTML in which I've embedded some JavaScript. In Firefox-62, it works on a Fedora-27 workstation as I want, but on a windows-7 box, the browser seems to act as if the script does not exist. Here is an HTML extract showing the embedded JavaScript: <table> <tr> <td style="padding: 0;"> <img id="BianqingPic" src="x" alt=""/> </td> </tr> </table> <p id="BianqingCaption" class="photocaption"> </p> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <script type="text/javascript"> "use strict"; var newPic = "BianQing_"; var d = new Date(); //-------------------------------------------------------------------------- // picture choice is based on deci-hours (1 deci-hour = 6 minutes). // all_minutes = (60 * hours) + minutes; range is 0 to 1439. // (day-of-month - 1) is then added to throw this "out of sync" with the // ErHu picture choice; range is 0 to 1469. // deci-hours = all_minutes / 6; range is 0 to 244. //-------------------------------------------------------------------------- var all_minutes = (d.getMinutes() + (60 * d.getHours())) + (d.getDate() - 1); var picnum = (Math.floor ( all_minutes / 6 ) % 7) + 1; document.getElementById ( "BianqingCaption" ).innerHTML = "Biān Qìng" + "&nbsp&nbsp(picture #" + picnum + " of 7; " + "based on deci-hours)"; newPic = newPic + picnum + ".jpg"; document.getElementById("BianqingPic").src = newPic; </script> I tried adding "console.log" statements just after the "use strict;" line, and between the last two lines of the script body. Absolutely nothing shows up in the web console or the browser console. Why is the script (apparently) being ignored? The windows-7 and the Fedora-27 systems were updated last week, as was Firefox. By the way, the w3schools page "https://www.w3schools.com/js/js_debugging.asp" is out of date. Firefox no longer uses Firebug, and the web site pointed to by the link provided for getting Firebug no longer exists. Thank-you in advance for your help. Bill.
×