logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-30-2011, 11:02 AM   #1
moviemastersdk
 
Join Date: Dec 2011
Posts: 33
Exclamation Live radiobutton/flipswitch output

I'm currently setting up a website to be used on android/iphone ect.

and i would like to have the changes made to the flip-switches, happen immediately,

it's is a website i'm making to control the lights in our house,
(don't worry, it'll be local network only)

and it would be nice if you could have a live output of either "0" or "1",

maybe something like

output :
room_1 0
room_2 1

but is there anyway to make it live, if not, how would i make the form output show a list like that?

i've posted an example of the page here

http://mountaincraft.dnsd.me/lightest.html

in the example i used

<form action="/output/output.txt" method="post" enctype="application/x-www-form-urlencoded" name="Lights Status">

i a attempt to get the form post to a txt file,

but no luck...

thx in adv.
moviemastersdk is offline   Reply With Quote
Old 12-30-2011, 02:36 PM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

The action attribute has to go to a file on your server that generates the txt file. The web page can not do it.
domedia is offline   Reply With Quote
Old 12-30-2011, 03:16 PM   #3
moviemastersdk
 
Join Date: Dec 2011
Posts: 33
Default

is there anyway you could do this in php?

EDIT:
i've got a mysql database?
moviemastersdk is offline   Reply With Quote
Old 12-30-2011, 05:45 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Yes, you can do it in PHP or another server side language. You might want to look into a more dynamic solution even with javascript (ajax) where you don;t need the submit button.
domedia is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com