<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRe: RDB1868Cmsis2_uip webserver - cgi function problem</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/RDB1868Cmsis2-uip-webserver-cgi-function-problem/m-p/630567#M24806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the cause myself.&lt;/P&gt;&lt;P&gt;Just in case someone facing the same problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a script end we are looking for a new line in the following function:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;static void&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;next_scriptstate(struct httpd_state *s)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; char *p;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; p = strchr(s-&amp;gt;scriptptr, ISO_nl) + 1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That´s why in case of an input box we have to write the html code like this and it´ll work!&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;form method="post"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;input name="Text1" type="text"&amp;nbsp; value="&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%! shuttlespeed&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"/&amp;gt;&amp;lt;/form&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jan 2017 06:33:20 GMT</pubDate>
    <dc:creator>ronwal</dc:creator>
    <dc:date>2017-01-20T06:33:20Z</dc:date>
    <item>
      <title>RDB1868Cmsis2_uip webserver - cgi function problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RDB1868Cmsis2-uip-webserver-cgi-function-problem/m-p/630566#M24805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My project is based the RDB1868Cmsis2_uip webserver sample. Hardware is OM130085.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When defining cgi functions in my html page, the page will be created faulty by the webserver&lt;/P&gt;&lt;P&gt;This happens, even if the function doesn´t exist on the the controller,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let´s say:&lt;/P&gt;&lt;P&gt;I define an input control with "!% name" as value, in order to be updated by the controller.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;input name="Text1" type="text"&amp;nbsp; value="%! name"/&amp;gt;&amp;lt;/form&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/p&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;script&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;function myFunction() {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;a.s.o&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After starting the webserver and loading that page the input control looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="inputbox.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12695iCCF5C21D63FC12D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="inputbox.jpg" alt="inputbox.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If i than analyze the html page (with F12 inside IE) I can see that the page have been sent faulty by the webserver:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;p&amp;gt;&amp;lt;input name="Text1" type="text"&amp;nbsp; value="&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/p&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pretty sure, that I didn´t change anything related of the original code.&lt;/P&gt;&lt;P&gt;Does anybody have the same problem or any idea how to solve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;br Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 10:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RDB1868Cmsis2-uip-webserver-cgi-function-problem/m-p/630566#M24805</guid>
      <dc:creator>ronwal</dc:creator>
      <dc:date>2017-01-19T10:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: RDB1868Cmsis2_uip webserver - cgi function problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RDB1868Cmsis2-uip-webserver-cgi-function-problem/m-p/630567#M24806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the cause myself.&lt;/P&gt;&lt;P&gt;Just in case someone facing the same problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a script end we are looking for a new line in the following function:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;static void&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;next_scriptstate(struct httpd_state *s)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; char *p;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; p = strchr(s-&amp;gt;scriptptr, ISO_nl) + 1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That´s why in case of an input box we have to write the html code like this and it´ll work!&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;form method="post"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;input name="Text1" type="text"&amp;nbsp; value="&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%! shuttlespeed&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"/&amp;gt;&amp;lt;/form&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 06:33:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RDB1868Cmsis2-uip-webserver-cgi-function-problem/m-p/630567#M24806</guid>
      <dc:creator>ronwal</dc:creator>
      <dc:date>2017-01-20T06:33:20Z</dc:date>
    </item>
  </channel>
</rss>

