473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Can I get some HTML code for this attached Image

365 100+
Can I get some HTML/CSS code for this attached Image. I need just Two lines, but I should be able to select only one line (if I select Second line, it should throw warning like "select one port and click apply". I need status like

PLUG1 O ON O OFF PLUG 1 Status ^00&0001 | ON | OFF |;
PLUG2 O ON O OFF PLUG 2 Status ^00&0002 | ON | OFF |;

appreciated.
Attached Images
File Type: jpg 8port.jpg (6.2 KB, 122 views)
Nov 9 '09 #1
11 2137
Dormilich
8,658 Expert Mod 8TB
if you show me what you have managed so far, I can tell you, whether you’re on the right path.
Nov 9 '09 #2
tvnaidu
365 100+
Thanks for help. I got this. I don't know how to put that title. also I want to select only one plug at a time, I need some warning if I second plug.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>:: SWITCH PANEL</title>
  6. <style>
  7. html,body{
  8.       margin-top:0px;
  9.       margin-bottom:0px;
  10.       margin-right:0px;
  11.       margin-left:0px;
  12.       background-color:#FFFFFF;         
  13.       font-family:Verdana, Arial, Helvetica, sans-serif;
  14.       font-size: 11px;
  15.       color:#000000;      
  16. }
  17. .text {
  18. font-family:Verdana, Arial, Helvetica, sans-serif;
  19. font-size:12px;
  20. color:#333333;
  21. font-weight:bold;
  22. border-bottom:1px solid #FF9900;
  23. }
  24. .on_text {
  25. font-family:Verdana, Arial, Helvetica, sans-serif;
  26. font-size:12px;
  27. color:#00CC33;
  28. font-weight:bold;
  29. border-bottom:1px solid #FF9900;
  30. }
  31. .off_text {
  32. font-family:Verdana, Arial, Helvetica, sans-serif;
  33. font-size:12px;
  34. color:#CC0000;
  35. font-weight:bold;
  36. border-bottom:1px solid #FF9900;
  37. }
  38. .on_button {
  39. border:0px solid #00CC00;
  40. background-color:#00CC00;
  41. color:#FFFFFF;
  42. font-size:12px;
  43. font-weight:bold;
  44. }
  45. .off_button {
  46. border:0px solid #FF0000;
  47. background-color:#FF0000;
  48. color:#FFFFFF;
  49. font-size:12px;
  50. font-weight:bold;
  51. }
  52. .line
  53. {
  54. border-bottom:1px solid #FF9900;
  55. }
  56. </style>
  57. <script language="javascript">
  58. function refreshPage()
  59. {
  60.     location.href="plugv1.htm";
  61. }
  62. function submit_Confirm(id)
  63. {        
  64.     var stat = confirm("Are you sure you want to Submit ?");    
  65.     if(stat!="")
  66.     {            
  67.             document.sp.submit();        
  68.     }
  69.     else
  70.         { 
  71.         }
  72. }
  73. function logout_Confirm()
  74. {        
  75.     var stat = confirm("Are you sure you want to Logout ?");    
  76.     if(stat!="")
  77.     {            
  78.             // Logout logic and page to be re -direct    
  79.     }
  80.     else
  81.         { 
  82.         }
  83. }
  84. </script>
  85.  
  86. </head>
  87. <body>
  88. <!-- end --></td></tr></table>
  89. <br />
  90. <!-- <form name="sp" method="post" action=""> -->
  91. <form name="input" action="/plugv1.htm" method="get">
  92. <table align="center" cellpadding="10" cellspacing="0" style="border:2px solid #FF9933;" border="0">
  93. <tr bgcolor="#FFF5EB">
  94. <td class="text" align="left">PLUG 1</td>
  95. <td class="on_text" align="left"><input type="radio" name="plug1" value="ON1">ON</td>
  96. <td class="off_text" align="left"><input type="radio" name="plug1" value="OF1">OFF</td>
  97. <td class="text" align="left">PLUG 1 Status</td>
  98. <td class="text" align="left">^00&0001&nbsp;&nbsp;</td>
  99. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  100. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  101. </tr>
  102. <tr bgcolor="#FFEBD2">
  103. <td class="text" align="left">PLUG 2</td>
  104. <td class="on_text" align="left"><input type="radio" name="plug2" value="ON2">ON</td>
  105. <td class="off_text" align="left"><input type="radio" name="plug2" value="OF2">OFF</td>
  106. <td class="text" align="left">PLUG 2 Status</td>
  107. <td class="text" align="left">^00&0002&nbsp;&nbsp;</td>
  108. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  109. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  110. </tr>
  111. <tr bgcolor="#FFF5EB">
  112. <td class="text" align="left">PLUG 3</td>
  113. <td class="on_text" align="left"><input type="radio" name="plug3" value="ON3">ON</td>
  114. <td class="off_text" align="left"><input type="radio" name="plug3" value="OF3">OFF</td>
  115. <td class="text" align="left">PLUG 3 Status</td>
  116. <td class="text" align="left">^00&0004&nbsp;&nbsp;</td>
  117. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  118. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  119. </tr>
  120. <tr bgcolor="#FFEBD2">
  121. <td class="text" align="left">PLUG 4</td>
  122. <td class="on_text" align="left"><input type="radio" name="plug4" value="ON4">ON</td>
  123. <td class="off_text" align="left"><input type="radio" name="plug4" value="OF4">OFF</td>
  124. <td class="text" align="left">PLUG 4 Status</td>
  125. <td class="text" align="left">^00&0008&nbsp;&nbsp;</td>
  126. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  127. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  128. </tr>
  129. <tr bgcolor="#FFF5EB">
  130. <td class="text" align="left">PLUG 5</td>
  131. <td class="on_text" align="left"><input type="radio" name="plug5" value="ON5">ON</td>
  132. <td class="off_text" align="left"><input type="radio" name="plug5" value="OF5">OFF</td>
  133. <td class="text" align="left">PLUG 5 Status</td>
  134. <td class="text" align="left">^00&0010&nbsp;&nbsp;</td>
  135. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  136. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  137. </tr>
  138. <tr bgcolor="#FFEBD2">
  139. <td class="text" align="left">PLUG 6</td>
  140. <td class="on_text" align="left"><input type="radio" name="plug3" value="ON6">ON</td>
  141. <td class="off_text" align="left"><input type="radio" name="plug3" value="OF6">OFF</td>
  142. <td class="text" align="left">PLUG 6 Status</td>
  143. <td class="text" align="left">^00&0020&nbsp;&nbsp;</td>
  144. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  145. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  146. </tr>
  147. <tr bgcolor="#FFF5EB">
  148. <td class="text" align="left">PLUG 7</td>
  149. <td class="on_text" align="left"><input type="radio" name="plug7" value="ON7">ON</td>
  150. <td class="off_text" align="left"><input type="radio" name="plug7" value="OF7">OFF</td>
  151. <td class="text" align="left">PLUG 7 Status</td>
  152. <td class="text" align="left">^00&0040&nbsp;&nbsp;</td>
  153. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  154. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  155. </tr>
  156. <tr bgcolor="#FFEBD2">
  157. <td class="text" align="left">PLUG 8</td>
  158. <td class="on_text" align="left"><input type="radio" name="plug8" value="ON8">ON</td>
  159. <td class="off_text" align="left"><input type="radio" name="plug8" value="OF8">OFF</td>
  160. <td class="text" align="left">PLUG 8 Status</td>
  161. <td class="text" align="left">^00&0080&nbsp;&nbsp;</td>
  162. <td class="line">&nbsp;|&nbsp;<input type="button" class="on_button" value=" ON " />&nbsp;|</td>
  163. <td class="line"><input type="button" class="off_button" value=" OFF " />&nbsp;|;</td>
  164. </tr>
  165. </table>
  166. <br />
  167. <table width="253" border="0" align="center" cellpadding="5" cellspacing="0" style="border:1px solid #FF9900;" bgcolor="#FFF5EB">
  168.       <td class="text">ALL PLUGS </td>
  169.       <td class="on_text"><input type="radio" name=plugx value="ONX"/>ON </td>
  170.       <td class="off_text"><input type="radio" name=plugx value="OFX">OFF </td>
  171. </table>
  172. <br />
  173. <table width="474" border="0" align="center" cellpadding="5" cellspacing="0" style="border:0px solid #FF9900;">
  174.       <td align="left"><input type="submit" value="Submit" onclick="submit_Confirm();"/></td>
  175.       <td align="center"><input type="reset" value=" Clear " /></td>
  176.       <td align="right"><input type="button" value="Refresh" onClick="refreshPage();"/></td>
  177. </table>
  178. <br />
  179. <table width="474" border="0" align="center" cellpadding="5" cellspacing="0" style="border:0px solid #FF9900;">      
  180.       <td align="center"><input type="button" value=" Logout " onclick="logout_Confirm();"/></td>    
  181. </table>
  182. </form>
  183. <!-- end --></td></tr></table>
  184. <br />
  185. </body>
  186. </html>
  187.  
  188.  
Nov 9 '09 #3
Dormilich
8,658 Expert Mod 8TB
there are 2 possibilities to check only one "ON" radio

1) give all the "ON" radios the same name, this way you cannot select more than one. use javascript to match the "OFF" radios
Expand|Select|Wrap|Line Numbers
  1. // for each line, e.g. using class
  2. // somewhat pseudo code
  3. if (false == ON.checked)
  4.     OFF.checked = true;
  5. else
  6.     OFF.checked = false;
2) pair the "ON" and "OFF" radios, check all radios to "OFF" and only the current one (back) to "ON"

there are various ways to implement each of the ideas.
Nov 9 '09 #4
tvnaidu
365 100+
If I give the same name, I need to pass name, its value to server, that tells microcontroller to make high or low that particular GPIO pin.

Can I get some html code for header?. I put the header info in image file I attached in first message
Nov 9 '09 #5
Dormilich
8,658 Expert Mod 8TB
@tvnaidu
the browser does that for you.

@tvnaidu
what header?

if you speak of HTTP headers, you should not set them yourself (unless you have very good (or evil) reason to)

if you speak of HTML <meta> elements in the <head>, they are for the browser only
Nov 9 '09 #6
tvnaidu
365 100+
I can give same name for all (instead pulg1, plug2.....I can give plug", but value has to be different, ON5 means, GPIO 5 to be high, OF5 means, GPIO 5 to low,


# <td class="on_text" align="left"><input type="radio" name="plug5" value="ON5">ON</td>
# <td class="off_text" align="left"><input type="radio" name="plug5" value="OF5">OFF</td>
Nov 9 '09 #7
Dormilich
8,658 Expert Mod 8TB
if I understand you right, you want only one of the GPIOs set to high. so you just need the name of that GPIO which is to be set, all others are reset to low. thus the radio for OFF is just eye candy…
Nov 9 '09 #8
tvnaidu
365 100+
I have 8 GPIO pins, one for each, I need to let Microcontroller know pin number and ON or OFF.
Nov 9 '09 #9
Dormilich
8,658 Expert Mod 8TB
so it doesn’t matter whether one or more pins are on?
Nov 9 '09 #10
tvnaidu
365 100+
These are independent pins, one might be high and other might be low, user can turn on any one and turn off any one. web should take one at a time.
Nov 9 '09 #11
Dormilich
8,658 Expert Mod 8TB
then pair the radios.
________________
Nov 9 '09 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: sonic | last post by:
Hello, I am cloning a table row which contains images that have behaviors attached to them as well as onclick events. The problem is that the cloned row seems to be executing the...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
36
by: sonnystarks | last post by:
I am trying to learn HTML and have obtained several books on the subject. However, I am confused with the proper way of going about it as most of these books give me the basic tags and then say...
1
by: Peter Williams | last post by:
Hello All, I'm a newbie to this ng. I'm posting here because I have a question about debugging some javascript on some pages of my website. Please don't call me a "troll" -- because I'm not one....
5
by: Steven Nagy | last post by:
Hi, I am sending an email in my .NET2.0 web app using: System.Net.Mail.Attachment System.Net.Mail.MailMessage I can successfully send an HTML email with a background image, however that...
2
by: jon | last post by:
Hi This might be an easy one to answer but I have a web form in an ASP.NET 1.1 application with a hand-rolled HTML image button as follows which opens a help guide in a new window: <input...
3
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm...
7
by: Mariusf | last post by:
I am a novice Perl programmer and need to change a perl script that I use to create web pages with thumbnail images and some text. Currently the script created a web page for each artist / category...
4
karthickkuchanur
by: karthickkuchanur | last post by:
I am using JasperReports 2.0.5. I am trying to use the background tag to generate a watermark image for my reports. JRXML source is below and also attached.The problem is that I do not get HTML...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.