devxlogo

Dynamically Loading Different Files Into Frames

Dynamically Loading Different Files Into Frames

Using the frame’s location object, you can load a number of different files into a frame at runtime. As you do when building any project using frames, first build a file that defines your frame. For our example, we defined a frame called myframe. The code below would then go in a separate file.

Placed in the BODY of the code is a list of files from which the user can choose. When a user clicks on the file name he wants to load, the name of the file is passed as a parameter to the function. The function appends the “.htm” extension to the name, and assigns the complete name to the location object of the frame myframe, which loads the appropriate file into that frame.

  History topics 
Load file 1
Load file 2
Load file 3
See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist