Jump to content

Search the Community

Showing results for tags 'Paramater'.

  • 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. I am trying to run a function that will convert a number and output it to a program. I have 2 different buttons and i want them to do a different event but i dont know what parameter to send to the function. Html code <input name="COM1" type="button" id="COM1" value="COM1 A" onClick="COMSET(paramter1)"><input name="COM1S" type="button" id="COM1S" value="COM1 S" onClick="COMSET(parameter2)"> Javascript function COMSET(){var FREQ = Number(prompt ("Frequency"));var jqXHR;$.ajaxSetup({ async: false });jqXHR = $.getJSON("http://" + location.hostname + "/clear_events", function(dane) {});jqXHR = $.getJSON("http://" + location.hostname + "/add_event?name=COM1A&eventname=COM_RADIO_SET", function(dane){});jqXHR = $.getJSON("http://" + location.hostname + "/add_event?name=COM1S&eventname=COM_STBY_RADIO_SET", function(dane){});$.ajaxSetup({ async: true });FREQ = FREQ.toFixed(2);alert(FREQ);var n1 = FREQ.substr(0, FREQ.indexOf("."));n1 = n1.substr(n1.length-2);alert(n1);var n2 = FREQ.substr(FREQ.indexOf(".")+1,2);alert(n1 + " : " + n2);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 );alert(bcd);var jqXHR;jqXHR = $.getJSON("http://" + location.hostname + "/set_event_value?name=COM1&value=" + bcd, function(dane) {});jqXHR = $.getJSON("http://" + location.hostname + "/set_event_value?name=com1s&value=" + bcd, function(dane) {});}
×
×
  • Create New...