473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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

Sep 18 '06 #1
2 2395

D`Jinn Deegee wrote:
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?

Sep 18 '06 #2
D`Jinn Deegee wrote:
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.
So what it sounds like you want to do is
have a couple of main.html files that
insert those other HTML files as shared content.

There are different ways to do this.
You could use AJAX to fetch the pages
and it's related load event.

You could also use a hidden frame and an onload event

In either case the event callback function you make would
move the resulting html data to a div in your page.

There are some other ways too if you don't like these
Sep 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Thomas | last post by:
Hi there, a while ago, I posted a question regarding reading japanese text from a text file. Well, since I solved the problem, I thought I'd post my solution for the benefit of other people with...
3
by: Chris Cioffi | last post by:
I started writing this list because I wanted to have definite points to base a comparison on and as the starting point of writing something myself. After looking around, I think it would be a...
6
by: BenSimmons | last post by:
Hi i'm creating a program that reads various log files from another program (Find-a-Drug DC project). The problem is, when I read some of the logs I get the error This process cannot access the...
5
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a...
2
by: Marc Scheuner | last post by:
Folks, I'd really like to use log4net for our error logging, but I'm having two problems: 1) For certain cases, I'd like to log error and messages to text files. I tried both the regular...
1
by: shank | last post by:
I borrowed the below code from http://www.brainjar.com/asp/dirlist/ and cannot get it to read my folder files. I don't get any errors or any output to screen. I have the below folder permissions...
14
by: Frank | last post by:
I see that ImageFormat includes exif. But I can't find out if I've System.Drawing.Image.FromStream or something like it can read and/or write that format.
2
by: wstsoi | last post by:
hi I have to read images from spreadsheet, is it possible to do with php?
2
hsriat
by: hsriat | last post by:
I am not sure how many of you would have faced this problem, but I faced this many times. I am not good at memorizing things, so I give lot of code comment in my code. And never wanted that code to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.