Jump to content

Search the Community

Showing results for tags 'parseInt'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 2 results

  1. I am using Microsoft Flight Simulator and 2 programs on it called Simconnect and Websimconnect. FSX <-> Simconnect <-> Websimconnect <-> Webpage Its designed to control things in FSX from a Webpage. One thing it can do is display Radio frequencies and interact with them. The problem is when simconnect reads the radio there not in MHz or KHz, there in BCD16, BCD32, and BCO16. Mainly i want to figure out the BCO16 (binary coded octal 16), how to take BCO16 and convert it to a 4 digit Integer for the Transponder. Transponder is a 4 digit code that each digit runs between 0-7 so 0000-7777. but unlike Binary Base2 or Decimal Base10. BCO16 acts like base 16 instead of base8. So once you got to 0010 it is 16 in BCO16 0100 is 256 and 1000 is 4096. I know i need to use parseInt and to convert the number but not sure what the code hast to be. I know i need to take each digit and parse it out. This is the code to Convert the COM frequency from XXX.XX to BCD format. After the 1 is dropped from the Com freq. var bcd = (parseInt(n1.charCodeAt(0) - 0x30 )<<12) + (parseInt(n1.charCodeAt(1) - 0x30 )<<8) + (parseInt(n2.charCodeAt(0) - 0x30 )<<4) + parseInt(n2.charCodeAt(1) - 0x30 ) but im not sure how to do the BCO16 conversion and i was wondering if somebody could explain it to me. I dont expect it to be done for me but show me how to do it so i can learn it.
  2. Hello, Once again, I seem to be having an issue with my Javascript. I'd be most grateful if I could have some pointers. Here's my Code Pen ... http://codepen.io/anon/pen/LEpvmL I'm trying to create an image scroller. The example lacks polish but it displays the concept: an initial image is loaded (which will be, in fact, a much wider image than it's container, which has it's overflow: hidden) and will scroll to the left to reveal the next part of the image after a given time frame. In the Code Pen, it works. When I try to put the same code into my html, css, and js files the js doesn't seem to work. The Dev tools in Chrome suggests that it cannot read property style of parseInt(slideEle.style.left); and I don't know why. All input is appreciated.
  • Create New...