Home/Support/Support Forum/How to use a cgi function ?
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to use a cgi function ?

0 votes

I'm a french student on programming school and I'm training at the moment in a small company where I'm programming on Dynamic C language (Dynamic C Dist 9.62 version). I'm a begginer in this language.

I must create a HTTP server with a rabbit 3365.

Currently, I succed to read Dynamic C variables in HTML document with #web in dynamic C code and <?z echo($my_var)?> in html code.

I would like to trigger a Dynamic C function from the web page. Therefore I read pdf documentation about tcp/ip in rabbit but I don't found what I search.

I tried cgi function like this:
- in dynamic C code I created a cgi function with HttpState* as an input and I included it in SSPEC_RESOURCETABLE_START .
- in HTML code succed to trigger this function from a link like this: <A HREF="/function1.cgi">text</a>.

This works, I can trigger the cgi function (just printf() at the moment) from this link but the web browser redirect me on "x.x.x.x/cgiFunctionName" (normal for a link). Therefore I can't do any other action after the cgi function triggering.

I would like to have a solution to trigger the same cgi function but from a button (or a link) without redirection.
If there is an other solution (without cgi), I also take it !

Thank you in advance for people who help me !
asked Jun 26, 2013 in Rabbit by edvin New to the Community (1 point)
retagged Jun 27, 2013 by edvin

Please log in or register to answer this question.

2 Answers

0 votes
Hello Edvin,

Under Dynamic C 9.62, there are some examples related to web server at the below path

Go through those apps. It may help you.

And also check below document
answered Jun 27, 2013 by cpigilam Veteran of the Digi Community (655 points)
0 votes
Thank you cpigilam,

It's works with cgi_redirectto(state,REDIRECTTO) =)
answered Jun 28, 2013 by edvin New to the Community (1 point)