It is possible to clump together a chunk of HTML, stick it in a ‘master file’ and call it up on my webpage instead of having to rewrite the HTML for that object every time it appears on the page?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System
The included file should not have a header, title or anything like that, unless it is needed(for example including a common header). It can be HTML, Javascript, or more php code.
__________________
Go FREELANCE <=|If a donkey eats a melon, it is still a donkey... |=> Hire Me
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System
I’m not really understanding what you mean by use a function with SSI. I’ve done some browsing around and none of the tutorials and guides that I’ve read have made any reference of functions in relation to SSI.
You don't actually make a function in SSI. You include a file that has the code to write out the required HTML.
eg:
To write a button that changed (as buttons do) captions etc:
Code:
<%
sub writeButton( sType, sName, sID, sValue)
dim quotes
quotes = chr(34)
with response
.write "<input "
.write "type="
.write quotes
.write sType
.write quotes
if sID <> "" then
.write " id="
.write quotes
.write sID
.write quotes
end if
if sName <> "" then
.write " name="
.write quotes
.write sName
.write quotes
end if
if sValue <> "" then
.write " value="
.write quotes
.write sValue
.write quotes
end if
.write ">"
.write vbcrlf
end with
end sub
%>
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System
« Reply to Loading a chunk of HTML as an object from a master file?