Hello,
I work with a Rabbit 4300 and Dynamic C 10.72. I’ve maked a web site with HTML5 CSS3 Javascript and RabbitWeb.
My system has some status, the user needs to see imediatly when a default happened. I would like to resfresh the web page when a data change without an user request.
I’m sorry for my english.
Thanks for your help.
Hello, There is rabbit geek work book at the below link.
http://www.alcom.nl/binarydata.aspx?type=doc/RabbitGeek_AJAX_Workbook_v1_1.pdf
In the above document explained that how to implement dynamic web pages under Dynamic C.
Thanks.
Hello,
Thanks for your answer.
I’ve not found a solution for my problem with your link. Maybe I did a bad research. But all the things I’ve seen are forms or buttons.
I would like to refresh the web page without any request or ajax from the web site. I want to do this in Dynamic C:
int status = 0;
status = getStatusFromRS232();
if(status == 1)
{
// refresh the web page
}
So the user can see in reel time if there are some problems with the system. He doesn’t control anything.
Have you an idea ?
Thanks for your help and sorry about my english.
Hello, At the below link, go through the section
“The Amazing JavaScript” in the page number 57 , it may help you ,how to refresh the web page by using the java script.
http://www.alcom.nl/binarydata.aspx?type=doc/RabbitGeek_AJAX_Workbook_v1_1.pdf
Hello,
Thanks for your answer.
I’ve read “The Amazing JavaScript” in the page number 57 at your link. But It can’t help me because it works with a form and a request from the user.
I would like to refresh the web site from the microprocessor Rabbit. No more Javascript.
I don’t know how to explain differently my problem. I’ve already explain it in my others post.
Thanks for your help and sorry about my english.
Hello,
If you use the code that explained in the page 57 and 58 as it is, it will update the data on the page once you click on the GetXML button. If you do not want to click the button and get the page refresh automatically , you have to modify the code as below.
use the Get_XML() function in the body tag in the html page as below. It will automatically update the data without pressing the button on the page.
Also comment the below code in the html source code.
I hope it may help you.
In the Dynamic C code, you can only update the data as below code snippet.To the best of my knowledge you can not refresh the page from the DC code.
int status = 0;
status = getStatusFromRS232();
if(status == 1)
{
My_Data1++;
My_Data2++;
My_Data3++;
My_Data4++;
}
In this way, we have to define a timeout for reload the datas. And I would like to refresh only and immediatly when the status change. If I decide to set the timeout at, one second for example, I think that the script will slow the web site. Moreover, if I don’t reload the page, the RabbitWeb’s variables keep their first value.
So I would like to refresh the page from the microprocessor Rabbit. But if it isn’t possible… I don’t know what I will do…