Jump to content

DoyleChris98

Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DoyleChris98

  • Rank
    Newbie
  1. I have created a Websocket between my webpage and a application acting like a server on my computer. And the program is sending data though the Websocket, but i am trying to display it. When i open the page in the Chrome Developers Tools i get this. {"message":"SIMCONNECT_RECV_ID_SIMOBJECT_DATA","value":{"COM1_A":128.250000,"COM1_S":128.300003,"COM2_A":127.800003,"COM2_S":127.900002,"NAV1_A":108.500000,"NAV1_S":117.199997,"NAV2_A":110.599998,"NAV2_S":116.800003,"ADF1_A":284.000000,"ADF2_A":240.000000,"XPDR_A":4608}} Now im trying to figure out how to display the data into a div on
  2. Well i got it to work with the code you gave in post #9 jsfiddle. Next question can i make it so the to buttons act like radio buttons that shut off on when the other is clicked.
  3. No your code you gave me, when you pressed the test it change the other button. What i want is to change the button that you click. so what im reading on the internet is that i cant call a function in javascript, (i.e.:Function changeclass()) and have it run a function and change the class. I haft to use jquery toggleclass() outside and use it to look for a button press to change the class. When i can use a onclick() in html and have a javascript function change it.
  4. Well this is what i have this. function changeclass(){ $("#testid").click(function(){ $("#testid").removeClass("testclass").addClass("testclassclicked"); });var a = 2;var b = a + a;alert(;} I can get it to do the addition and display it but sometime the button changes color and others it dosen't. Is there a way to change it back.
  5. First its not that i want the button to just change the look i want it to run a function like add 2+2. Example. again function add(){ toggleclass() or whatever changes the class of the button to the clicked state. var a = 2; var b = a+a; alert (; that is what i want to do. As for javascript being inline, its the best way right now to test things. Once testing is done then i will create a separate file.
  6. well the example i put in the fiddle is just a example that i was trying to use. Im not sure on how to code it that is why I'm here trying to learn. I understand that things can't change till the page fully loaded. In the fiddle that you posted when you click the test button it changes the clicked example button, and I would like it to change the button that you click i.e. the test button. Next if i do use the code to change the button, can i still use the onClick() to run a function that is with the button click. Also need it to change back to the black background green text when you
  7. I made a JSFiddle with some code but dosent work when clicked. The test button is the way it looks before clicked, then the clicked example is what it looks like after clicked. JSFiddle
  8. I have another thread in HTML working with it at http://w3schools.invisionzone.com/index.php?showtopic=52535. Looking into addClass() and removeClass() on the examples and i have a few questions. In the example they are changing the <p> of the HTML code. <p class="intro">This is a paragraph.</p> The code I'm using is this. <div><input type="button" class="RADIO" checked="checked" id="COM1TX" name="COMTX" value="COMTX1"><input type="button" class="RADIO1" id="COMRX" name="COMRX" value="COMRX"><input type="button" class="RADIO" id="COM2TX" name="COMT
  9. I was wondering if javascript or jquery could change the look of a CSS class in a function called by a onclick(). For example I have a #first and also a .unclicked and .clicked. And i have a input type="button" id="first" class="unclicked" onclick="function()". function(){ change class from unclicked to clicked on first then some other code } Inside the function how do i change the class from unclicked to clicked. I know you haft to use the document.getid(first).style, but I'm not sure how to get the function to change it.
  10. The program uses a a webpage function to set items. For example in the picture above Pad2 in post #15 if you click one of the XXX.XXX it calls a function. <div class="DISP2" id="COM1S" name="COM1S" onclick="CONVERT(this)">XXX.XXX</div> Function function CONVERT(event){ FREQ = parseFloat(document.getElementById("INPUT").value); FREQ = FREQ.toFixed(2); var n1 = FREQ.substr(0, FREQ.indexOf(".")); n1 = n1.substr(n1.length-2); var n2 = FREQ.substr(FREQ.indexOf(".")+1,2); var bcd = (parseInt(n1.charCodeAt(0) - 0x30 )<<12) + (parseInt(n1.charCodeAt(1) - 0x30 )&
  11. Alright i through together what it should look like but function isn't all the way there and i have attached a jsfiddle of it to. In the fiddle i use focus to show the change when active. COM 1 Tx and COM 2 Tx (with yellow to ID them in the picture) should act like Radio Buttons turn on on the other shuts off. The rest should act like Check Boxes to turn on and off. Later they will be calling a function when clicked but thats later. https://jsfiddle.net/zxo0myah/ Fullscreen https://jsfiddle.net/zxo0myah/embedded/result/
  12. Ok here is the story. Theirs a program that comes with Microsoft Flight Simulator (FSX) called Simconnect which you can right C++ programs to access FSX though Simconnect. A person made a program that accesses Simconnect through a webpage called Websimconnect (Webpage <-> Websimconnect <-> Simconnect <-> FSX). Things that you can do is change Radios, Display your location on google maps from FSX, and many other things. What i'm trying to create is a LCD radio display that you can enter the Frequency and change radios that shows up on a website. I have the keypad layout do
  13. Anybody with a idea on this. I wa able to get the Radio Buttons to move but i cant get the checkboxes to Style and also i cant figure out the location with the relative setting. I dont know what the location is relative to.
  14. Its used for a game Microsoft Flight Simulator, its for entering radio frequencies from a webpage. you press the keypad buttons (0-9, ., C, to enter the frequency in the input box then press the bottom XXX.XXX to enter the frequency, then it enters it into FSX. Also i can open the ATC window with the small buttons next to the input box. And the buttons that i need the Radio and Check Boxes for turn on and shut off the radios. The XXX.XXX show up because i dont have FSX running at the time of the picture. I was using the DIV tags because it was either here or at stackoverflow that somebod
  15. Well your half right, the color when activated is right. But I would like COM and COM2 set up and radio buttons, so whe you click on COM it lights up but when you click COM 2, COM 2 lights up and COM turns off. Ill attach a picture of how and where i want them to go. If you look at the picture the line that the arrow is pointing at its at 840px from the left. That is where the buttons will line up from the left and the height from the top will be solved when when the left is figured out. and in the picture there is COM 1 Tx, COM 1,2 Rx, COM 2 Tx. Where COM 1 Tx and COM 2 Tx will be radio
×
×
  • Create New...