Re: [mh] Dynamic web pages

H Plato <[email protected]> Fri, 23 Jan 2026 13:42:38 -0700
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <[email protected]>
--===============5620663899924237667==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_F2E518C8-657E-410D-95CA-5CE95350536C"


--Apple-Mail=_F2E518C8-657E-410D-95CA-5CE95350536C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

I built a =E2=80=99static page=E2=80=99 function into IA7 to allow for =
mixing static HTML with buttons that would automatically change with the =
AJAX functions.=20

There is two steps to this, linking the static html to the collections. =
Add an entry like this to collections.json:

   "126" : {
      "icon" : "fa-truck",
      "link" : "/ia7/house/garage.shtml",
      "name" : "Garage"
   },

and inside the shtml file define the buttons and call the static update =
script at the end:

	<div class=3D"col-sm-4">
		   <div style=3D"vertical-align:middle">
		<button entity=3D'gd_south' class=3D'btn btn-default =
btn-lg btn-list btn-popover btn-block btn-state-cmd=20
navbutton-padding=E2=80=99>South Garage Door<br><span class=3D'pull-right =
object-state'>loading...</span>
		</button>
		</div>
	</div>
   </div>
 </div>
=09
<script>
 updateStaticPage();
</script>

> On Jan 23, 2026, at 11:53=E2=80=AFAM, Mike Jones <[email protected]> =
wrote:
>=20
> I use ajax call backs to update dynamic info
> Gives a nice refresh no flashing etc
> Easy to implement
>=20
> Mike
>=20
> From: Brian M <[email protected]>
> Sent: Friday, January 23, 2026 3:26:28 PM
> To: Mister House User mailing =
<[email protected]>
> Subject: [mh] Dynamic web pages
> =20
> Does MH's "my_mh" web server support dynamic web pages (e.g. fields=20
> update without a refresh)? I have a few pages, like the one that=20
> interfaces to my music player, that would really benefit.
>=20
> I've rummaged a bit through the mailing list archives and found old=20
> references to example files that don't exist anymore, but not much =
else.=20
> Does anyone have any hints, links, or examples to get me started?
>=20
>                          -Brian M.
>=20
>=20
>=20
> ________________________________________________________
> To unsubscribe from this list, go to: =
https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>=20
> ________________________________________________________
> To unsubscribe from this list, go to: =
https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>=20


--Apple-Mail=_F2E518C8-657E-410D-95CA-5CE95350536C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" =
content=3D"text/html; charset=3Dutf-8"></head><body =
style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;">I built a =E2=80=99static page=E2=80=99 =
function into IA7 to allow for mixing static HTML with buttons that =
would automatically change with the AJAX =
functions.&nbsp;<div><br></div><div>There is two steps to this, linking =
the static html to the collections. Add an entry like this to =
collections.json:</div><div><div><br></div><div><div>&nbsp; &nbsp;"126" =
: {</div><div>&nbsp; &nbsp; &nbsp; "icon" : "fa-truck",</div><div>&nbsp; =
&nbsp; &nbsp; "link" : "/ia7/house/garage.shtml",</div><div>&nbsp; =
&nbsp; &nbsp; "name" : "Garage"</div><div>&nbsp; =
&nbsp;},</div></div><div><br><div>and inside the shtml file define the =
buttons and call the static update script at the =
end:</div><div><div><br></div><div><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>&lt;div =
class=3D"col-sm-4"&gt;</div><div><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">		</span> &nbsp; &lt;div =
style=3D"vertical-align:middle"&gt;</div><div><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">		=
</span>&lt;button entity=3D'gd_south' class=3D'btn btn-default btn-lg =
btn-list btn-popover btn-block =
btn-state-cmd&nbsp;</div><div>navbutton-padding=E2=80=99&gt;South Garage =
Door&lt;br&gt;&lt;span class=3D'pull-right =
object-state'&gt;loading...&lt;/span&gt;</div><div><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">		=
</span>&lt;/button&gt;</div><div><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">		=
</span>&lt;/div&gt;</div><div><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>&lt;/div&gt;</div><div>&nbsp; =
&nbsp;&lt;/div&gt;</div><div>&nbsp;&lt;/div&gt;</div><div><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span></div><div>&lt;script&gt;</div><div>&nbsp;updateStaticPage();</div>=
<div>&lt;/script&gt;</div></div><div><div><br><blockquote =
type=3D"cite"><div>On Jan 23, 2026, at 11:53=E2=80=AFAM, Mike Jones =
&lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div>

<meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii">

<div>
<div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, =
Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, =
33, 33);" dir=3D"auto">
I use ajax call backs to update dynamic info</div>
<div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, =
Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, =
33, 33);" dir=3D"auto">
Gives a nice refresh no flashing etc</div>
<div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, =
Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, =
33, 33);" dir=3D"auto">
Easy to implement</div>
<div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, =
Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, =
33, 33);" dir=3D"auto">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, =
Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(33, =
33, 33);" dir=3D"auto">
Mike</div>
<div id=3D"ms-outlook-mobile-body-separator-line" =
data-applydefaultfontstyles=3D"true" dir=3D"auto" style=3D"font-family: =
Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, =
sans-serif; font-size: 12pt;">
<div style=3D"font-family: Aptos, Aptos_MSFontService, -apple-system, =
Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;">
<br>
</div>
</div>
<div id=3D"ms-outlook-mobile-signature" dir=3D"auto" style=3D"font-family:=
 Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, =
sans-serif; font-size: 12pt;">
</div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" =
style=3D"font-size:11pt"><b>From:</b> Brian M =
&lt;[email protected]&gt;<br>
<b>Sent:</b> Friday, January 23, 2026 3:26:28 PM<br>
<b>To:</b> Mister House User mailing =
&lt;[email protected]&gt;<br>
<b>Subject:</b> [mh] Dynamic web pages</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span =
style=3D"font-size:11pt;">
<div class=3D"PlainText">Does MH's "my_mh" web server support dynamic =
web pages (e.g. fields
<br>
update without a refresh)? I have a few pages, like the one that <br>
interfaces to my music player, that would really benefit.<br>
<br>
I've rummaged a bit through the mailing list archives and found old <br>
references to example files that don't exist anymore, but not much else. =
<br>
Does anyone have any hints, links, or examples to get me started?<br>
<br>
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; -Brian M.<br>
<br>
<br>
<br>
________________________________________________________<br>
To unsubscribe from this list, go to: <a =
href=3D"https://lists.sourceforge.net/lists/listinfo/misterhouse-users">
https://lists.sourceforge.net/lists/listinfo/misterhouse-users</a><br>
<br>
</div>
</span></font></div>
</div>

________________________________________________________<br>To =
unsubscribe from this list, go to: =
https://lists.sourceforge.net/lists/listinfo/misterhouse-users<br><br></di=
v></blockquote></div><br></div></div></div></body></html>=

--Apple-Mail=_F2E518C8-657E-410D-95CA-5CE95350536C--


--===============5620663899924237667==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5620663899924237667==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


--===============5620663899924237667==--