Jump to content

web page rest interface


MarkJames

Recommended Posts

Hi,

I'm a very very very very basic html programmer. Emphasis on the basic.

 

I'm trying to add a simple web page to my personal web space that lets me turn the lights on and off in the house. It's purely meant for local use so all the links map within my 192.168.0.xxx network space.

 

I've created the page and added all the necessary rest commands and it works perfectly. I've got on and off text hyperlinks to each appropriate rest command - one for each ON and one for each OFF.

 

The only thing of it is that when I click the link the browser treats it as it should - as a link - and opens the rest command result in either a new tab or in the same tab. Either way the focus shifts to a tab/page/browser window other than the one with all my buttons. I'd like it to stay on the same page so I can press additional buttons without having to switch back. Ideally I don't care to see the rest command result at all.

 

I'm sure this is a snap for all the web design savvy folks out there. I'd sure appreciate a nudge in the right direction.

 

Thanks,

 

Mark

Link to comment

Take a look at the bottom link in my signature. Here I set up a FosCam using the HTML interface of the ISY Web Server.

 

When you send a REST command (as you pointed out) it returns a result and this is undesirable for a web page where the links are just buttons.

 

What you want to do is tell that link to open someplace else. You'll often see this as a pop up or new tab.

 

I went the route of setting up a frame in the web page that it would go to. This has the benifit that you don't really see it, and you stay on the page where your buttons are.

 

It is called an iFrame.

 

Up/Left

 

In the above link, the target is an iFrame called 'control'.

 


 

In the above code is the iframe. I place mine on the bottom of the page.

 

That frame will display the reply (such as 200). In the below image you'll see my interface and at the very bottom you'll see the iframe (cut off).

 

Interface.jpg

Link to comment

Also as a note, the Web Server lets you set your page as the default. So when you go to your isy it displays your page instead of the default one.

 

I found adding a button to go to the normal one was helpful for accessing things I have not programmed in yet.

UD Ajax

 

In that example, the target '_self' is the full page.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...