conditionally combining multiple html files

A

alwayswinter

I currently have a form where a user can enter results from a genetic
test. I also have a pool of summaries that would correspond to
different results that a user would enter into the form. I ideally I
would like to have the user enter their results and then have a master
summary created with the different word or HTML files on submit.
(condition 1 + condition 2 = combining/displaying corresponding HTML
files) I've gotten as far as creating the form and conditionally
launching IE, but it is the combining of the HTML files based on the
if/then statements I am having trouble with, if anyone has any
suggestions it would be very helpful? I'm using HTML, PHP, Javascript
with a little help from dreamweaver.
 
W

web.dev

Hi alwayswin,

The problem with is this, Javascript does not have a mechanism in which
it can include HTML files. What you probably want to do is use PHP
instead and use the 'require()' or the 'include()' function to bring in
HTML pages.
 
C

Christopher J. Hahn

I currently have a form where a user can enter results from a genetic
test. I also have a pool of summaries that would correspond to
different results that a user would enter into the form. I ideally I
would like to have the user enter their results and then have a master
summary created with the different word or HTML files on submit.
(condition 1 + condition 2 = combining/displaying corresponding HTML
files) I've gotten as far as creating the form and conditionally
launching IE, but it is the combining of the HTML files based on the
if/then statements I am having trouble with, if anyone has any
suggestions it would be very helpful? I'm using HTML, PHP, Javascript
with a little help from dreamweaver.

Could be done with JavaScript, but personally I'd recommend using PHP's
include function (or is it a keyword?). I think it'd make for a very
easy, very flexible way of implementing combinations of document
fragments. Each fragment could also include its own PHP code if you
wanted to go that way.
 
R

Randy Webb

web.dev said:
Hi alwayswin,

The problem with is this,

The main problem with this post is you don't know (or choose not to) how
to quote.
Javascript does not have a mechanism in which it can include HTML files.

Sure it does. But whether the UA supports it or not is another question.
What you probably want to do is use PHP instead and use the 'require()'
or the 'include()' function to bring in HTML pages.

He would probably end up better off including fragments rather than
complete HTML pages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top