This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > October 2005 > Frame alternative using CSS
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Frame alternative using CSS
|
|
| mal_k100@hotmail.com 2005-10-06, 6:39 pm |
| I am seeting up a help system that uses some common text. Using a frame
I can link to the common text :
<FRAMESET ROWS="100,*" >
<FRAME SRC="SpecificTextForHelpPage1.htm" scrolling=no frameborder=0
noresize >
<FRAME SRC="GenericText.htm" frameborder=0 noresize>
</FRAMESET>
This is repeated for SpecificTextForHelpPage2.htm and so on, using the
same Generictext on the lower part of the page.
All I really want to do is have a method whereby I can change parts of
the common text and it changes on all the pages. I had thought of an
alternative of using an image but it then doesn't allow me to change
the attributes using my style sheet.
Everything works within reason - there are a few things I'd like to
changes such as fixed widths etc but I could do that with frames/tables
etc.
I cannot use any server side due to the environment - i.e. it CANNOT be
used.
(sorry to shout !)
I did post a message about 'including' common code in HTML - no joy
unless I use a package but I cannot do that either.
Any thoughts ?
Solutions not essential just a few ideas would be good !
Cheers
| |
| Spartanicus 2005-10-06, 6:39 pm |
| mal_k100@hotmail.com wrote:
>All I really want to do is have a method whereby I can change parts of
>the common text and it changes on all the pages.
Any decent editor has a Search and Replace function, good ones offer
multi line S&R, really good ones also allow regular expressions to be
used.
--
Spartanicus
| |
| Jón Fairbairn 2005-10-06, 6:39 pm |
| mal_k100@hotmail.com writes:
> I am seeting up a help system that uses some common text. Using a frame
> I can link to the common text :
> <FRAMESET ROWS="100,*" >
> <FRAME SRC="SpecificTextForHelpPage1.htm" scrolling=no frameborder=0
> noresize >
> <FRAME SRC="GenericText.htm" frameborder=0 noresize>
> </FRAMESET>
>
> This is repeated for SpecificTextForHelpPage2.htm and so on, using the
> same Generictext on the lower part of the page.
>
> All I really want to do is have a method whereby I can change parts of
> the common text and it changes on all the pages. [...]
> I cannot use any server side due to the environment - i.e. it CANNOT be
> used.
In such circumstances I'd use a macro preprocesor (such as
m4, though for this anything that can process an "include"
would do) and then use a makefile to ensure the changes are
propagated to all the resulting .html files before uploading
to the server.
--
Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk
| |
| Chris Beall 2005-10-06, 6:39 pm |
| mal_k100@hotmail.com wrote:
(snip)
> All I really want to do is have a method whereby I can change parts of
> the common text and it changes on all the pages. I had thought of an
> alternative of using an image but it then doesn't allow me to change
> the attributes using my style sheet.
(snip)
> I cannot use any server side due to the environment - i.e. it CANNOT be
> used.
(snip)
> I did post a message about 'including' common code in HTML - no joy
> unless I use a package but I cannot do that either.
(snip)
mal_l100,
Not sure what you mean by 'package', but another preprocessor which will
include code into a page is PPWizard. Info at
http://dennisbareis.id.au/ppwizard.htm.
A preprocessor is run on your development system, not on the server.
When you make a change to the common code, you run everything through
the preprocessor, which picks up the revised version of the code and
inserts it into every source file at the location you specify.
PPWizard will do a lot more than this, but is small and fast enough that
it isn't a waste to use it for simple including such as you describe.
It is free.
Chris Beall
| |
| mal_k100@hotmail.com 2005-10-07, 6:50 am |
| Thanks guys
Unfortunately I am developing something that is to be passed on to a
client who would not have access to any sort of preprocessor hence
using frames where I can reuse the code but no need for any other
software as it can then be manipulated in whatever the client has.
As for a search and replace, I think you misunderstand... I have 10 or
so pages that have common script. The whole point is to avoid loading
in each one and doing a search and replace if I wanted to do that I
would just write once and paste 9 times - that is wasteful on time and
resource.
I personally would use a preprocessor if it were just down to me. Pity
there is no #incude in HTML.
Frames will have to do for now I guess !
Cheers
| |
| Spartanicus 2005-10-07, 6:51 am |
| mal_k100@hotmail.com wrote:
>As for a search and replace, I think you misunderstand... I have 10 or
>so pages that have common script. The whole point is to avoid loading
>in each one and doing a search and replace if I wanted to do that I
>would just write once and paste 9 times
An editor with a good S&R function offers directory wide S&R with an
option to include subdirs, no need to open any files.
The power of a really good S&R function is something most people
apparently cannot imagine if they don't have an editor that offers it
(few do).
--
Spartanicus
| |
| mal_k100@hotmail.com 2005-10-14, 6:38 pm |
|
Spartanicus wrote:
>
> An editor with a good S&R function offers directory wide S&R with an
> option to include subdirs, no need to open any files.
>
> The power of a really good S&R function is something most people
> apparently cannot imagine if they don't have an editor that offers it
> (few do).
>
> --
> Spartanicus
I understand what you are saying for a directory wide search and
replace but that would still mean having duplicate data everywhere.
That seems to defeat the general principle in computing of reuse. Not
trying to get into an argument but everything else seems able to reuse
boiler plate or similar e.g. resuse of stored procedures in databases,
ability to access external spreadsheets in Excel in fact almost
everything I can thinnk of except html (unless using frames or a custom
editor). Also when working on a client site, there are issues about
using software that is not generally available or part of a company's
'standard' software - hence not wanting to use a better HTML editor. It
would be OK for me but when I move on, the client would be left
maintaining loads of files - or, as you suggest, getting a directory
wide browser.
Thanks anyway !
| |
| Spartanicus 2005-10-14, 6:38 pm |
| mal_k100@hotmail.com wrote:
>I understand what you are saying for a directory wide search and
>replace but that would still mean having duplicate data everywhere.
>That seems to defeat the general principle in computing of reuse.
"Reusing" data on the web with frames, iframes or any other form of
"client side inclusion" mechanism breaks a fundamental principle of the
web: a single url should refer to all content of that resource.
>Not
>trying to get into an argument but everything else seems able to reuse
>boiler plate or similar e.g. resuse of stored procedures in databases,
>ability to access external spreadsheets in Excel in fact almost
>everything I can thinnk of except html
You are confusing data formats such as HTML or the Excel data format
with the applications that produce it. Reuse of data chunks is handled
by the application, and this is no less possible for HTML. Several
options are available to reuse data: using a preprocessor, S&R, content
management systems, authoring software that uses a template system such
as Frontpage or Dreamweaver etc.
All of these methods can be used to produce a proper webpage, so long as
you abstain from the fundamentally flawed "client side inclusion"
mechanisms.
--
Spartanicus
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|