Connecting Tech Pros Worldwide Help | Site Map

This program half-way ot prints on IE, then it hangs, don't know what is the issue?

Member
 
Join Date: Oct 2009
Posts: 91
#1: 4 Weeks Ago
This is just small plain HTML program wtote manually (since I am new to web programming, may be some tools I can use I think), this program loaded onto microcontroller with small foot print web server, when program prints, half-way it prints, then it struck, any issue with this?. when user clicks "submit" again it loaded same page. but it sends some sytring to server (plug1=ON&......), that string will be processed inside server.

any open source tools I can use to do better design?. appreciated.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>control page</title>
  4. </head>
  5.  
  6. <body>
  7.  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  
  8.  <br>
  9. <form name="input" action="/plugv1.htm" method="get">
  10.  
  11.  
  12. <div align="center">
  13.     <b><font size="6"> SWITCH PANEL </font></b>
  14.     <br><br>
  15. </div>
  16.  
  17. <div align="center">
  18. <b>PLUG1 &nbsp; &nbsp;  &nbsp;  </b> <input type="radio" name=plug1 value=ON1> <strong style="color:green;"> <b>ON</b> </strong> &nbsp;      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  19.     <input type="radio" name=plug1 value=OF1 > <strong style="color:red;"> OFF </strong> 
  20.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 1 Status</strong> ^00&0001|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  21. <br> 
  22. <b>PLUG2  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug2 value="ON2"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  23. <input type="radio" name=plug2 value="OF2"> <strong style="color:red;"> OFF </strong> 
  24.     <!-- <input type="radio" name=plug2 value="RB2" > REBOOT<br> -->
  25.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 2 Status</strong> ^00&0002|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  26. <br> 
  27. <br> 
  28. <b>PLUG3  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug3 value="ON3"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  29. <input type="radio" name=plug3 value="OF3"> <strong style="color:red;"> OFF </strong> 
  30.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 3 Status</strong> ^00&0004|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  31. <br> 
  32. <b>PLUG4  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug4 value="ON4"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  33. <input type="radio" name=plug4 value="OF4"> <strong style="color:red;"> OFF </strong>
  34.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 4 Status</strong> ^00&0008|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  35. <br> 
  36. <br> 
  37. <b>PLUG5  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug5 value="ON5"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  38. <input type="radio" name=plug5 value="OF5"> <strong style="color:red;"> OFF </strong>
  39.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 5 Status</strong> ^00&0010|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  40. <br> 
  41. <b>PLUG6  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug6 value="ON6"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  42. <input type="radio" name=plug6 value="OF6"> <strong style="color:red;"> OFF </strong> 
  43.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 6 Status</strong> ^00&0020|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  44. <br> 
  45. <br> 
  46. <b>PLUG7  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug7 value="ON7"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  47. <input type="radio" name=plug7 value="OF7"> <strong style="color:red;"> OFF </strong> 
  48.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 7 Status</strong> ^00&0040|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" >|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;">|;</td>
  49. <br> 
  50. <b>PLUG8  &nbsp;  &nbsp;  &nbsp; </b> <input type="radio" name=plug8 value="ON8"> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  51. <input type="radio" name=plug8 value="OF8"> <strong style="color:red;"> OFF </strong> 
  52.     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <td> <strong>PLUG 8 Status</strong> ^00&0080|<input type="button" value="ON" style="background-color: #00cc00; color: #ffffff;" />|<input type="button" value="OFF" style="background-color: #cc0000; color: #ffffff;"/>|;</td>
  53. <br>
  54.  
  55.  
  56.  
  57. <table border="2" cellpadding="5">
  58. <td>
  59. <b>All Plugs  &nbsp;  &nbsp; </b> <input type="radio" name=plugx value="ONX" /> <strong style="color:green;"> ON </strong> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  60. <input type="radio" name=plugx value="OFX"> <strong style="color:red;"> OFF </strong> 
  61. </td></table>
  62.  
  63. </div>
  64. &nbsp;<br>
  65. <div align="center"><br>
  66. <input type="button" onclick="if (confirm('Are you sure to Submit this?')) submit();" value="Submit"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  67. <input type ="reset" value ="Clear"> &nbsp; &nbsp; &nbsp;
  68. <input type="button" value="Refresh" onclick="window.location.reload();" /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  69.  
  70.  
  71. </div>
  72. </form>
  73.  
  74. <br>
  75.  
  76. <form name="input" action="/plug_login.htm" method="get">
  77. <div align="right">
  78. <input type="submit" name="logout" value="Logout">
  79. <INPUT TYPE="HIDDEN" name="logoutExitPage" VALUE="/plug_login.html">
  80. </div>
  81. </form>
  82.  
  83.  
  84.  
  85. <br>
  86.  
  87. </div> &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; 
  88. </body>
  89.  
  90. </html>
Member
 
Join Date: Oct 2009
Posts: 91
#2: 4 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


Thanks Markus for keeping those [code] tags, sorry for that , next time onwards I will in mind to add tags.

Can somebody have any idea what is the wrong with the above prog, it prints half-way then stops. is any anyway I can write efficient prog using some open-source tool.

appreciated.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


When you say it prints, do you mean printing as in displaying in the browser, or printing onto paper from a printer?
Member
 
Join Date: Oct 2009
Posts: 91
#4: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


I mean displaying on browser, this code is running form microcontroller using tiny web server running microC. when web client running on PC connects to web server running on microcontroller, when this page getting loaded, it loads half-way and remining code won't load.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


Have you tried testing in other browsers?
Member
 
Join Date: Oct 2009
Posts: 91
#6: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


I was using IE and Firefox, on both it shows like that. I was thinking may be those <td> and <tr> doing something, may be some alignment issue or something?
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


Do you have a memory limit on the micro-controller? You should remove all the extra space characters (&nbsp;) that are unnecessary.
Familiar Sight
 
Join Date: Apr 2008
Posts: 147
#8: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


Quote:

Originally Posted by tvnaidu View Post

Thanks Markus for keeping those [code] tags, sorry for that , next time onwards I will in mind to add tags.

Can somebody have any idea what is the wrong with the above prog, it prints half-way then stops. is any anyway I can write efficient prog using some open-source tool.

appreciated.

Hi,

Can you please tell me how much portion you are able to view.. till which row..?

- as you said half-way..

Thanks!
Member
 
Join Date: Oct 2009
Posts: 91
#9: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


Here I have those radio buttons for input (select on or off and when user click on apply, it takes action, that is why the method declared as "get", the other part is status, where it reads the status and display on screen. I have screenshot, how can I post that screenshot?.

It is very interesting issue.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#10: 3 Weeks Ago

re: This program half-way ot prints on IE, then it hangs, don't know what is the issue?


Quote:

Originally Posted by tvnaidu View Post

I have screenshot, how can I post that screenshot?

Make a post and then click on Edit. You should have an option to attach an image.
Reply