...

View Full Version : problems using layers to function as frames



mayhem_sci
02-16-2003, 06:40 AM
ok, i don't know whether anyone has done this before, but I stumbled on a javascript that loads html files into a layer, and I thought why not use layers as frames, so that I have a layer as the top menu bar, and a layer as the main content area. works ok except that when html files are loaded, the base url remains as that of the main file, so all the images and links are wrong. for eg, if my main file (with the layers) is in the root folder, and i load a file "articles.htm" from the folder "mathematics" which contain some images like "logo.jpg", the image will not load since <img src"logo.jpg"> will be interpreted to be from root:logo.jpg instead of mathematics/logo.jpg.

i dun want to change the loaded files, since by doing so i cannot read that file alone without loading it from the main file. anyone has done this before and can offer some tips or advice?

Graeme Hackston
02-16-2003, 04:25 PM
I don't think there's much you can do. You have to use valid paths. You could use absolute URLs example

http://www.codingforums.com/myImage.gif



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum