469,348 Members | 1,682 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,348 developers. It's quick & easy.

conditionally combining multiple html files

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
3 1528
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
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
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.

Similar topics

7 posts views Thread by Hansan | last post: by
2 posts views Thread by Sten Westerback | last post: by
2 posts views Thread by Craig | last post: by
4 posts views Thread by Qwert | last post: by
2 posts views Thread by Jens Weiermann | last post: by
1 post views Thread by ningjun.wang | last post: by
5 posts views Thread by Tristan Miller | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.