seaofclouds wrote:hey ronnie -
my first priority is getting these mini views working without reloading the page.
Since this was your first priority, I figured I'll take a shot at it. Im not at my development environment right now but I can't wait to try it at home. Playtime is after I get home, after I spend time with the family after my kid sleeps so after 10PM...
Basically, I think all we need to do is:
In the index.html page, insert an iframe right before the end of the BODY tag:
<iframe name="ifAction" style=""display:none"></iframe>
Then on my javascript where I fire the event to send the insteon command which is right now this---
document.location = "setbrightness?device=" + devname + "&level=" + devval
I will then replace with this:
window.ifAction.src = "setbrightness?device=" + devname + "&level=" + devval
Which will then fire off this command on the hidden iframe and the main page will not be reloaded.
The only thing left is to add another line of code to update the red/green button to display the current value and set the dimmer value.
That's about it I think.
In your current case in the _devicelist.html where you have the buttons for dimmers with a link:
In this example the 100% button
<a>100%</a>
you would just replace this with the button firing a javascript instead so it would look something like:
<a>100%</a>
Then create a function at the top which will esentially do this:
function myfunction(a,b)
window.ifAction.src = "setbrightness?device=" + a + "&level=" + b
Something like this....
I should have a working version by tonight when i get home if that's all this is and I'm not over simplifying it.
Ronnie