Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Webserver plugin question

Questions and comments specific to a particular plugin should go here.
Post Reply
brainlessbart
Posts: 1
Joined: Sat Aug 20, 2011 10:45 pm

Webserver plugin question

Post by brainlessbart »

Hi there,

I have a question. I've been playing with te webserver plugin but get some strange behavior. When I refreh the page the last event (from a clicked link) is generated again in eg. Is this normal?

For instance: When ik click the first link a event is triggerd ("BuitenlampSchuurSwitch") when I then refresh te page the event is triggered again.

Thanks in advance.

Bart

Code: Select all

<html>
    <head></head>
    <body>
        <p>
	<a href="?BuitenlampSchuurSwitch">Buitenlamp schuur is {{"aan" if BuitenlampSchuur else "uit"}}</a>
            
        </p>
<p>
        <a href="?LampPlafondEettafelSwitch">Lamp plafond eettafel is {{"aan" if LampPlafondEettafel else "uit"}}</a>
        </p>

    </body>
</html>
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Webserver plugin question

Post by eatmeimadanish »

Yes, if you notice in the URL you will have not only your page, but a question mark and some data. This gets parsed by Eventghost as the event and payload. This is how the web server works, it gets sent a command via a URL address and translates that. When you send an event, you are just going to that url, thus a refresh will trigger the event again. If you want to hide the event via the webserver, use some javascript and use an AJAX call.
Post Reply