How to Embedded Output
Keywords: WebOutFile Weber files
I want to insert a date string into my HTML. I can do this quite readily with WIL but I don't see how I can
include this in an HTML document.
It seems that the whole document has to be output from WebBatch which is a bit tedious to do.
Is there any easy way to do this? I've not had any luck with the embed command and I haven't yet delved
into server-side includes.
There are several techniques. I'll outline them.
- The hard way. WebOut the entire html file.
- Figure out the constant portion of the files. Have several files, one for each section. Basically to put a
change in the middle you WebOutFile-WebOut-WebOutFile.
- Load entire file into binary buffer,
Load into variable via BinaryPeekStr. Do StrReplace on the string. Works for files mabe upto 6-12K in
- Weber files is an extension of #3, with all the bells and whistles you can imagine. You could also fight
I guessed that there wouldn't be a ready answer (a limitation of HTML and not WebBatch I should point
out). So, over the weekend, I gave it some some thought and have split the page into frames. Into one
frame I load the output from my WebBatch script by triggering it via a META HTTP-EQUIV... tag. I
have now extended the simple date format to include the time and, again by using META tags, I get the
browser to auto-reload the date/time frame every 30 seconds so keeping the time correct. Neat eh?
To elaborate a little, weber files are basically HTML files with WebBatch subroutines inserted within curly
braces. It's an extension to WebBatch written in WebBatch. The syntax is a little opaque, but once you
figure it out you can pretty much do anything you want. The WebBatch site is done
with weber files.
It's great for creating huge sites from templates, etc.
More info & complete source code (hack away!) is at:
Article ID: W12476
Filename: How to Change and Embed Something in an HTML doc.txt
File Created: 2017:07:28:12:58:11
Last Updated: 2011:06:07:07:12:33