CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

3.3V Ethernet Controller Development kit HTML code

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

View user's profile Send private message Send e-mail

3.3V Ethernet Controller Development kit HTML code
PostPosted: Mon Nov 04, 2019 4:08 am     Reply with quote

Hello there,
I would like to ask a question about the "3.3v Ethernet Controller Development kit" example. I made an application. Working properly. But I added a few lines of program to the ccs c compiler with HTML code. What I want to do is refresh the variable value without refreshing the page. How can I do that ? Which HTML code should I write for this?
Code:

rom char  HTML_ANALOG_PAGE[]="

<HTML>
<HEAD>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0\">
</HEAD>

<BODY BGCOLOR=#FFFFFF TEXT=#000000>
<IMG SRC=\"https://ajancnc.com/tr/img/ajanlogo.jpg\"><P>
<H1>ANALOG VALUE READ </H1>
<P>%0
<BR>%1
<P><A HREF=\"/\">Change LCD/LEDs</A>
</BODY>
</HTML>
";

_________________
Es
Ttelmah



Joined: 11 Mar 2010
Posts: 19481

View user's profile Send private message

PostPosted: Mon Nov 04, 2019 4:56 am     Reply with quote

Standard HTML cannot do a part refresh. You'd need to use something like
AJAX to allow a value to be updated without a page refresh.
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

View user's profile Send private message Send e-mail

PostPosted: Mon Nov 04, 2019 5:24 am     Reply with quote

Well, how do I add that ajax to the ccs c compiler? Does he want a library or something?
_________________
Es
Ttelmah



Joined: 11 Mar 2010
Posts: 19481

View user's profile Send private message

PostPosted: Mon Nov 04, 2019 7:05 am     Reply with quote

AJAX would mean you would have to have a server to provide the data.
Thinking about it just put your value into a frame, and have that refresh at
a short interval.
kmp84



Joined: 02 Feb 2010
Posts: 345

View user's profile Send private message

PostPosted: Mon Nov 04, 2019 7:18 am     Reply with quote

The easy way to do this is to add this one:
Code:

<meta http-equiv="refresh" content="5" >


but this will refresh all page with time period = 5 sec.

If you want to do this with AJAX scrip, CCS has tcp/ip example 'ex_webserver3' which also use optimized microchip MPFS file system.

Best Wishes!
Ttelmah



Joined: 11 Mar 2010
Posts: 19481

View user's profile Send private message

PostPosted: Mon Nov 04, 2019 7:29 am     Reply with quote

Agreed, but he can just put the refresh inside a frameset, and then just
this frame will refresh. Much more friendly.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group