By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,454 Members | 3,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,454 IT Pros & Developers. It's quick & easy.

conditionally combining multiple html files

P: n/a
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.

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Jul 23 '05 #2

P: n/a
al**********@gmail.com wrote:
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.

Jul 23 '05 #3

P: n/a
web.dev wrote:
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.