I have a server arduino webserverand normal webserver
Communication between these servers uses the sistem like link:
Standard web server for Arduiono server:
- ArduinoServer / light1 = on - light is on
- ArduinoServer / light1 = off - light off
Arduino web server for a regular web server:
- NormalWebserver / temperature = 22 & humidity = 56 & light1 = on
- NormalWebserver / temperature = 22 & humidity = 56 & light1 = off
Comunicaton works well, but the problem is with the action buttons, when I switch the lights, I need the just to accesseternal arduino websever link, and I also use the ajaxlight operator to test the light.
If the light statement is changed, my div.id = "light1" accepts the new javascript content, and my old code to prevent redirecting to arduino webserverno longer works.
The old code 'acces only'contains a link in the button:
$('a.access-only').click(function() {
$.get($(this).attr('href'), function(response) {
});
return false;
});
But I need code for this, even with new content from ajax.
source
share