We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi,
I am using LPC2366, written a code in scripting language.... In the web browser I want to display three selection BOXES, but when I try to open the web page with this code it does not open, However for two text boxes it works......... please suggest me the modification that has to be done in my code...
<----------------cdma.cgi------------------------> # Here begin data setting which is formatted in HTTP_CGI.C module--> t <TR><TD><IMG SRC=pabb.gif>Communication Mode</TD> c b o <TD><select name="cm"><OPTION %s>Ethernet</OPTION><OPTION %s>Gprs</OPTION><OPTION %s>Cdma</OPTION></select></TD></TR>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
<---------------- HTTP.c----------------------->
switch(env[2]){
case 'o':
if ( SchedCfg.ucCommedium == 0 )
len = sprintf((S8 *)buf,(const S8 *)&env [4], "selected", "", "" );
else if ( SchedCfg.ucCommedium == 1 )
len = sprintf((S8 *)buf,(const S8 *)&env[4], "", "selected", "" );
else if ( SchedCfg.ucCommedium == 2 )
len = sprintf((S8 *)buf,(const S8 *)&env[4], "", "", "selected" ); break;
It would help to indicate to everyone that you're using the Keil RTL-TCPNET software, and you're clearly using the HTTP_demo.c application as the basis for your project. This is obvious to me because I've used it myself, but it won't be obvious to everyone.
My first observation is that you are using rather long script lines. For example, the following line:
c b o <TD><select name="cm"><OPTION %s>Ethernet</OPTION><OPTION %s>Gprs</OPTION><OPTION %s>Cdma</OPTION></select></TD></TR>
This is 123 characters long. But the maximum script line length that you are allowed to have is 120 characters! See here (very last sentence at the bottom):
www.keil.com/.../rlarm_tn_http_scriptlang.htm
I am not sure if exceeding the script line length is the actual cause of your problem. I cannot remember if script lines that are too long are just truncated, or ignored altogether. But as a starting point, I suggest you break the script up into shorter lines and then we'll take it from there.
Oops - apologies for not breaking that line up and making things appear a little wide...!
Thanks,
Your suggestion has helped me to sort out my web page problem...
yes, scripting does not support more than 120 characters in a single line ... hence I have taken remaining characters in the second line...and it has worked for me...