SMS Javascript

  • TwistedClip
  • Born
  • Born
  • TwistedClip
  • Posts: 4

Post 3+ Months Ago

1. On the zone selection buttons, Zone 1, Zone 2, work fine but i have not
been able to make the "all call" work correctly. ive gone in and changed
the charecter length and inserted both IP but iyt does not work. Don't
know if there is a special way to notate multiple IP?

2.Beside the Window where you type in the text message we would like to
add four buttons that will fill in a predefined message into that box.
For now please use button names= 1,2,3,4 and Message=111,222,333,444 we
will be customizing this for each job and will change names and messages
accordingly.

3 Below this message box is the send button when we puch that button we
would like to be able to send a RS232 command string before the message.
the idea here is that the RS232 will change the input on the screens and
then display the message.

here is the code:

link: teeflick .com/test/test.html

Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3 .org/TR/html4/loose.dtd">
<html>
<head>
<title>Internal broadcast communications</title>

<script type="text/javascript"><!--
 function AddressReplacement(newip, button) {
 if (button.value == "Refresh page") {
     location.reload(true);
 }
else {
    var content = newip.value;
    var containers = document.getElementsByTagName("a");
    for ( var i = 0; i < containers.length; i++ ) {
        containers[i].innerHTML = containers[i].innerHTML.replace(/none/, content);
        containers[i].href = containers[i].href.replace(/ip_address/, content);
        }
    var myForm1 = document.getElementById("myForm1");
    myForm1.action = myForm1.action.replace(/ip_address/, content);
    var dispBut1 = document.getElementById("displayButton1");
    dispBut1.value = "Call next patient";
    var myForm2 = document.getElementById("myForm2");
    myForm2.action = myForm2.action.replace(/ip_address/, content);
    var dispBut2 = document.getElementById("displayButton2");
    dispBut2.value = "Display this message";
    button.value = "Refresh page";
    }
}
//--></script>

</head>

<body bgcolor="#FFFFFF">

<table width="100%" bgcolor="#FFFFFF" border="0">
<tr>
<th>
<font color="#2693CC" face="Impact, Arial" size="7">Speech To Text Interface</font>
<hr noshade size="1" width="350" />
<font color="#2693CC" face="Arial" size="5">Internal broadcast communications</font>
</th>
<td width="210"></td>
</tr>
</table>


<font face="Arial" color="#000080" size="-1">First Select Zone of Your <b>HMP100</b></font>
<form action="" style="margin:0">
<input type="hidden" name="newip" value="192.168.0.102" size="15" maxlength="15" style="width:130px;">
<input type="button" value="Zone 1" style="width:180px;" onclick="AddressReplacement(newip, this)">
</form>

<form action="" style="margin:0">
<input type="hidden" name="newip" value="192.168.0.103" size="15" maxlength="15" style="width:130px;">
<input type="button" value="Zone 2" style="width:180px;" onclick="AddressReplacement(newip, this)">
</form>

<form action="" style="margin:0">
<input type="hidden" name="newip" value="" size="15" maxlength="15" style="width:130px;">
<input type="button" value="All Zones" style="width:180px;" onclick="AddressReplacement(newip, this)">
</form>

<font face="Arial" color="#000080">
HMP100 currently set to: <a href="http://ip_address/preview.php"><b>none</b></a>


<p align="center">
<font face="Arial" color="#000080">
Use the button below to call next patient, you may specify where the person should go:<br />
</font>


<table align="center" width="400" border="1" cellpadding="6" cellspacing="0">
<tr><th>

<!-- ***** Replace "localhost" in the line below with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->
<form id="myForm1" action="http://ip_address:1234/update" method="get">
<!-- ***** Replace "localhost" in the line above with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->

  <input id="displayButton1" type="submit" name="next" style="width: 200px; height: 40px" value="Set HMP100 IP address before!" />
    <br /><br />
    <font face="Arial" color="#000080">Go to:</font> <input type="text" name="where" value="Reception 1" style="width: 145px" />
    <br /><br />
    <input type="submit" name="setzero" style="width: 200px" value="Reset counter" />    
</form>

</table>
<p align="center">
<font face="Arial" color="#000080">Use this interface to display instant messages on your screen, enter a new line per message to be displayed, or choose a predefined message:<br></font>
<br />

<table align="center" width="400" border="1" cellpadding="6" cellspacing="0">
<tr><th>

<!-- ***** Replace "ip_address" in the line below with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->
<form id="myForm2" action="http://ip_address:1234/update" method="get">
<!-- ***** Replace "ip_address" in the line above with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->

    <textarea name="message" rows="4" cols="40"></textarea>
    <br /><br />
  <input id="displayButton2" type="submit" name="submit" style="width: 340px" value="Set HMP100 IP address before!" />
</form>
</th></tr>
</table>


<br /><br />


</body>

</html>
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2.  "http://www.w3 .org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>Internal broadcast communications</title>
  6. <script type="text/javascript"><!--
  7.  function AddressReplacement(newip, button) {
  8.  if (button.value == "Refresh page") {
  9.      location.reload(true);
  10.  }
  11. else {
  12.     var content = newip.value;
  13.     var containers = document.getElementsByTagName("a");
  14.     for ( var i = 0; i < containers.length; i++ ) {
  15.         containers[i].innerHTML = containers[i].innerHTML.replace(/none/, content);
  16.         containers[i].href = containers[i].href.replace(/ip_address/, content);
  17.         }
  18.     var myForm1 = document.getElementById("myForm1");
  19.     myForm1.action = myForm1.action.replace(/ip_address/, content);
  20.     var dispBut1 = document.getElementById("displayButton1");
  21.     dispBut1.value = "Call next patient";
  22.     var myForm2 = document.getElementById("myForm2");
  23.     myForm2.action = myForm2.action.replace(/ip_address/, content);
  24.     var dispBut2 = document.getElementById("displayButton2");
  25.     dispBut2.value = "Display this message";
  26.     button.value = "Refresh page";
  27.     }
  28. }
  29. //--></script>
  30. </head>
  31. <body bgcolor="#FFFFFF">
  32. <table width="100%" bgcolor="#FFFFFF" border="0">
  33. <tr>
  34. <th>
  35. <font color="#2693CC" face="Impact, Arial" size="7">Speech To Text Interface</font>
  36. <hr noshade size="1" width="350" />
  37. <font color="#2693CC" face="Arial" size="5">Internal broadcast communications</font>
  38. </th>
  39. <td width="210"></td>
  40. </tr>
  41. </table>
  42. <font face="Arial" color="#000080" size="-1">First Select Zone of Your <b>HMP100</b></font>
  43. <form action="" style="margin:0">
  44. <input type="hidden" name="newip" value="192.168.0.102" size="15" maxlength="15" style="width:130px;">
  45. <input type="button" value="Zone 1" style="width:180px;" onclick="AddressReplacement(newip, this)">
  46. </form>
  47. <form action="" style="margin:0">
  48. <input type="hidden" name="newip" value="192.168.0.103" size="15" maxlength="15" style="width:130px;">
  49. <input type="button" value="Zone 2" style="width:180px;" onclick="AddressReplacement(newip, this)">
  50. </form>
  51. <form action="" style="margin:0">
  52. <input type="hidden" name="newip" value="" size="15" maxlength="15" style="width:130px;">
  53. <input type="button" value="All Zones" style="width:180px;" onclick="AddressReplacement(newip, this)">
  54. </form>
  55. <font face="Arial" color="#000080">
  56. HMP100 currently set to: <a href="http://ip_address/preview.php"><b>none</b></a>
  57. <p align="center">
  58. <font face="Arial" color="#000080">
  59. Use the button below to call next patient, you may specify where the person should go:<br />
  60. </font>
  61. <table align="center" width="400" border="1" cellpadding="6" cellspacing="0">
  62. <tr><th>
  63. <!-- ***** Replace "localhost" in the line below with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->
  64. <form id="myForm1" action="http://ip_address:1234/update" method="get">
  65. <!-- ***** Replace "localhost" in the line above with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->
  66.   <input id="displayButton1" type="submit" name="next" style="width: 200px; height: 40px" value="Set HMP100 IP address before!" />
  67.     <br /><br />
  68.     <font face="Arial" color="#000080">Go to:</font> <input type="text" name="where" value="Reception 1" style="width: 145px" />
  69.     <br /><br />
  70.     <input type="submit" name="setzero" style="width: 200px" value="Reset counter" />    
  71. </form>
  72. </table>
  73. <p align="center">
  74. <font face="Arial" color="#000080">Use this interface to display instant messages on your screen, enter a new line per message to be displayed, or choose a predefined message:<br></font>
  75. <br />
  76. <table align="center" width="400" border="1" cellpadding="6" cellspacing="0">
  77. <tr><th>
  78. <!-- ***** Replace "ip_address" in the line below with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->
  79. <form id="myForm2" action="http://ip_address:1234/update" method="get">
  80. <!-- ***** Replace "ip_address" in the line above with your HMP100 IP address (e.g. 192.168.1.10)! ***** -->
  81.     <textarea name="message" rows="4" cols="40"></textarea>
  82.     <br /><br />
  83.   <input id="displayButton2" type="submit" name="submit" style="width: 340px" value="Set HMP100 IP address before!" />
  84. </form>
  85. </th></tr>
  86. </table>
  87. <br /><br />
  88. </body>
  89. </html>



Thanks for your help!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 162 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.