relative references with konqueror?

  • Thread starter Sergio del Amo Caballero
  • Start date
S

Sergio del Amo Caballero

Hi,
I discover a strange bug in Konqueror 3.1.1.
I design a javascript application which acts in one file called
example.html. At the beggining of this js i write:

if (document.images)
{
folderopen= new Image(16,16);
folderopen.src="http://www.sergioamo.8m.com/buttons/folder_open.png";
folderclose= new Image(16,16);
folderclose.src="http://www.sergioamo.8m.com/buttons/folder_close.png";
}
functions....
....
...
..
and my javascript works perfect.
If i write:

if (document.images)
{
folderopen= new Image(16,16);
folderopen.src="./buttons/folder_open.png";
folderclose= new Image(16,16);
folderclose.src="./buttons/folder_close.png";
}
functions...
....
...
..
my javascript does not work properly. Does anyone knows if is imposible
to use relative references with konqueror 3.1.1 or which is the problem?
Thanks for your future feedback.
 
F

Fabian

Sergio del Amo Caballero hu kiteb:

and my javascript works perfect.
If i write:

if (document.images)
{
folderopen= new Image(16,16);
folderopen.src="./buttons/folder_open.png";
folderclose= new Image(16,16);
folderclose.src="./buttons/folder_close.png";
}
functions...

Delete the ./ part of the relative reference, and it should work ok.
 
V

VK

folderopen.src="./buttons/folder_open.png";

There is no such notation as "./" in HTML. There is "../" meaning "one
level up"
So it's either "../buttons/folder_open.png" (level up and down to
"buttons") or "buttons/folder_open.png" (straight down to "buttons").
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top