Hi, I want to read html files from a html file.

D

D`Jinn Deegee

I have 5 html files say

file1.html
file2.html
:
:
file5.html


Now I have another html file (main.html) where I want to use 1 html
file at a time but I want to read all of them. Like when this main html
loads it calls file1 and executes it then calls file2....then 3 till
file 5.

How do I use js. I need a js function to do this.


Thanks
 
J

Jake Barnes

D`Jinn Deegee said:
I have 5 html files say

file1.html
file2.html
:
:
file5.html


Now I have another html file (main.html) where I want to use 1 html
file at a time but I want to read all of them. Like when this main html
loads it calls file1 and executes it then calls file2....then 3 till
file 5.


What do you mean when you write " it calls file1 and executes it "?
HTML files are not things you can execute. Did you mean these were JS
files? Or by "execute" did you mean simply "show". How do you want
these different files to show up?

If you mean show, one way you could do this would be with AJAX calls,
and the easiest way to achieve that would be using someone else's
library. I prefer to use Prototype. This is what I did on my dad's site
to keep photo captions in sync with the photos being displayed. You can
see what I mean here:

http://www.ralphkrubner.com/Commercial/

Click the "Next" button a few times. An AJAX call updates the caption
each time a new image appears. Is that the effect you are going for?
 

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
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top