View previous topic :: View next topic |
Author |
Message |
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
|
3.3V Ethernet Controller Development kit HTML code |
Posted: Mon Nov 04, 2019 4:08 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Mon Nov 04, 2019 4:56 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
|
|
Posted: Mon Nov 04, 2019 5:24 am |
|
|
Well, how do I add that ajax to the ccs c compiler? Does he want a library or something? _________________ Es |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Mon Nov 04, 2019 7:05 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
kmp84
Joined: 02 Feb 2010 Posts: 345
|
|
Posted: Mon Nov 04, 2019 7:18 am |
|
|
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! |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Mon Nov 04, 2019 7:29 am |
|
|
Agreed, but he can just put the refresh inside a frameset, and then just
this frame will refresh. Much more friendly. |
|
![](templates/subSilver/images/spacer.gif) |
|