EmbeddedRelated.com
Forums

Question about send parameter from web site with cgi

Started by OmarPoch 5 years ago3 replieslatest reply 5 years ago84 views

Hi team. I'm ussing RCM3700 DC 925 and RabbitWeb

I´m sorry if my question is very "dumb"

I have a page with a link thats call to a .cgi declarated into my RCM 3700 ussing Dynamic C

the page has a button with this sentence:

<input id="button" type="button" onClick="location.href='/savetmp1.cgi'" value"Save">

in C program, I have this

int save_temp1(HttpState* state){

printf("the temp is saved");

cgi_redirectto(state,"/index.zhtml");

}

when I click the button, the instructions declarated into C programs runs OK. :D

But I want to send an additional parameter from the web page link,

(the sentences are only examples:

<input id="button" type="button" onClick="location.href='/savetmp1.cgi' ? 'HEY' " value"Save">

and then recive this into CGI

int save_temp1(HttpState* state, char* param){

printf(param);

printf(" : the temp is saved");

cgi_redirectto(state,"/index.zhtml");

}

I have looking for the answer but I can not find it. Can you help me ???

Best Regards

Omar




[ - ]
Reply by mr_banditJuly 10, 2019

Not my area of expertise, but I suspect you have the syntax wrong.

[ - ]
Reply by OmarPochJuly 10, 2019

Hi mr_bandit. Thank you for your answer.

Yes, I know that the sencence I've wrote is not correct. It is only an example.

I want to send a parameter attached to zhtml instruction

<input id="button" type="button" onClick="location.href='/savetmp1.cgi'" value"Save">

to be used in C program

Thanks again


[ - ]
Reply by mr_banditJuly 10, 2019

It was the 

 ? 'HEY'

that looked suspicious.