ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Re: [ECS] JAVAscript questions
Kent Noonan
Wed, 9 Feb 2000 17:01:02 -0600
Wed, 9 Feb 2000 17:01:02 -0600
Is this what you are wanting with the visual look??

On 8 Feb 00, at 17:38, Mark Gilmore wrote:

> I have just uploaded a sample ECS web page to
> http://www.usit.com/omnip/x.htm.
> Questions:
> 1) I am prefacing each form entry (TEXT/SELECTION) with
>    an Item name. How can I make this a FIXED-length field
>    (for visual alignment) ?
> 2) For SELECT entries, I am using an ONCHANGE command to
>    send changes to ECS (this works fine).
>    For TEXT entries, I am using an associated RADIO button
>    and an ONCLICK to send changes. What is a better way to do this ?
>    I could use a normal link, but I don't know how to trigger
>    the send on a click unless I add separate javascript code
>    ELSEWHERE (NOT desirable). A SUBMIT wants to send ALL data.
> 3) Any other suggestions for my html/javascript ?
> THANKS
> -- 
> Mark Gilmore
> Omnipotence (ECS home automation software)
> http://www.usit.com/omnip
> 423-745-0026





<HTML>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
	var secs=30
function timer_fnc()
	{
	timer = setTimeout("timer_fnc()", 1000)
	if (secs == 0)
		location.href=location.href
	else
		{
		secs--
		window.status = secs
		}
	}
</SCRIPT>
<BODY onload="timer_fnc()">
Group 1:<form name="Group 1">
<TABLE>
<TR>
<TD>
Number:
</TD>
<TD>
<input name="Number" type="TEXT" size="19" onfocus="secs=30" value="0">
</TD>
<TD>
<input type="radio" name="SET" onclick="location.href=location.href+'?'+Number.name+'='+Number.value"><BR>
</TD>
</TR>
<TR>
<TD>
Time:
</TD>
<TD>
<input name="Time" type="TEXT" size="19" onfocus="secs=30" value="12:00 AM">
</TD>
<TD>
<input type="radio" name="SET" onclick="location.href=location.href+'?'+Time.name+'='+Time.value"><BR>
</TD>
</TR>
<TR>
<TD>
Hour:
</TD>
<TD>
<select name="Hour" size="1" onfocus="secs=30" onchange="location.href=location.href+'?'+name+'='+this[selectedIndex].text">
<option selected>12AM</option>
<option>1AM</option>
<option>2AM</option>
<option>3AM</option>
<option>4AM</option>
<option>5AM</option>
<option>6AM</option>
<option>7AM</option>
<option>8AM</option>
<option>9AM</option>
<option>10AM</option>
<option>11AM</option>
<option>12PM</option>
<option>1PM</option>
<option>2PM</option>
<option>3PM</option>
<option>4PM</option>
<option>5PM</option>
<option>6PM</option>
<option>7PM</option>
<option>8PM</option>
<option>9PM</option>
<option>10PM</option>
<option>11PM</option>
<option>None</option>
</select>
</TD>
</TR>
<TR>
<TD>
Daytime:
</TD>
<TD>
<select name="Daytime" size="1" onfocus="secs=30" onchange="location.href=location.href+'?'+name+'='+this[selectedIndex].text">
<option>False</option>
<option selected>True</option>
</select>
</TD>
</TR>
</TABLE>

</form>
</BODY>
</HTML>


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.